Optical member inspecting apparatus and method of inspection thereof

ABSTRACT

An optical member inspection apparatus includes an inspection optical system having a light source, and a diffusing means for diffusing the light emitted from the light source. The diffusing means has a central portion and a peripheral portion. The diffusion transmittance of the peripheral portion is higher than the diffusion transmittance of the central portion. The inspection optical system is also provided with an image pick-up means to pick-up an image of the optical member to be inspected, and is positioned so as to receive that light emitted from the light source and transmitted through the diffusing means and the optical member. A judging means is also provided, for judging whether or not the optical member has a defect, in accordance with image signals output from the image pick-up means.

This application is a Division of Ser. No. 08/658,549 filed Jun. 5, 1996now U.S. Pat. No. 6,148,097.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to an apparatus and method thereof forinspecting optical members, mostly optical members made of plastic, andmore particularly relates to an apparatus and method for inspectingoptical members using image processing technology.

2. Description of the Related Art

Recently, optical members made of plastic have been widely used inphotographing lens systems or finders of cameras, due to theirlightweight and low-cost qualities.

However, with such optical members there is a possibility that dust,e.g., in the form of carbonated plastic, remains in the mold afterinjection molding and thus might enter inside a lens being molded.Additionally, since plastic is softer than glass, there is a higherpossibility of a flawed lens being produced, and therefore inspectionfor defects before assemble has an increased importance.

Defect inspection is undertaken in order to judge whether an opticalmember has sufficient performance to be used, namely whether it isnon-defective and useable, or is defective and can not be used.

In the prior art, defect inspection is usually either in the form ofvisual inspection by the naked eye, in which a skilled workerilluminates the optical member, such as a lens or prism, by an intenselight, or in the form of image processing of an inputted image obtainedby picking-up an image of the optical member.

If dust has entered a lens, factors such as the size of the dust, thedepth of entry, or the distance from the optical axis, need to bedetermined. On the other hand, if there is a flaw, factors such as thesize of the flaw, the surface on which the flaw is, or the distance ofthe flaw from the optical axis, need to be determined.

The criteria used for judging whether an optical member is defective ornon-defective, is different depending on whether dust has entered themember or whether there is a flaw, for example, even in the case thatthe dust and the flaw have the same size, one may be allowable, e.g.,the dust, while the other type of defect, e.g., the flaw, is not.Therefore, an inspector should judge whether the lens is defective ornon-defective, not only from the extent of the defect, but also from theidentification of the type of defect, i.e., whether it is dust or aflaw.

In visual inspections by the naked eye, a judgement as to whether a lensis defective or non-defective is subjective according to each individualinspector, and thus judgement criteria may change according to thephysical condition of the same inspector, e.g., in the weakening of theeyes, to say nothing of the judgement criteria of a different inspector,thus making it difficult to maintain unitary judgements.

SUMMARY OF THE INVENTION

The present invention is made considering the problems of the prior artas described above. An object of the present invention to provide anoptical member inspection apparatus and method of inspection thereofcapable of judging the defectiveness of an optical member according toobjective criteria.

Another object of the present invention is to provide an optical memberinspection apparatus capable of obtaining the most appropriate luminancein accordance with the shape of an object to be inspected.

Yet another object of the present invention is to provide an opticalmember inspection apparatus capable of obtaining the most appropriateluminance in accordance with the color of a defect.

Still another object of the present invention is to provide an opticalmember inspection apparatus capable of obtaining the most appropriateluminance for detecting defects according to the type of an object to beinspected.

Another object of the present invention is to provide an apparatuscapable of being used for an optical member, as a subject forinspection, that has a function of a wedge prism which deflects light inone direction.

Another object of the present invention is to provide an optical memberinspection apparatus and method of inspection thereof provided with amagnification adjustment function capable of setting magnificationaccording to objective criteria.

Still another object of the present invention is to provide an opticalmember inspection apparatus, in regard to an inspection apparatus byusing image processing, capable of promptly detecting a defect of anobject to be inspected.

Another object of the present invention is to provide an optical memberinspection apparatus capable of detecting a mold mark separated fromother defects using image processing.

Yet another object of the present invention is to provide a method ofmark separation capable of separating a mark accurately through simpleprocessing, from an input image obtained by picking-up an image of anoptical member, and also provides an optical member inspection apparatususing the same method.

Still another object of the present invention is to provide a method ofefficient inspection in the case of a sequential inspection of opticalmembers in regard to a plural number of items to be inspected, and alsoprovide an optical member inspection apparatus using the method.

Another object of the present invention is to provide an optical memberinspection apparatus and method of inspection thereof, for which it isnot necessary to execute complicated image processing for the removal ofnoise etc., while the subject inspection range is wider than thedesigned effective aperture.

Yet another object of the present invention is to provide an opticalmember inspection apparatus capable of expediting the duration ofinspection in the case of a sequential inspection of a plural number ofobjects to be inspected.

Still another object of the present invention is to provide a method ofcontrolling of lighting luminance, according to a histogram of apicked-up image, and also provides an optical member inspectionapparatus using the same method.

To achieve the objects mentioned above, according to an aspect of thepresent invention, an optical member inspection apparatus is providedhaving an inspection optical system having a light source, and adiffusing means for diffusing the light emitted from the light source.The diffusing means has a central portion and a peripheral portion. Thediffusion transmittance of the peripheral portion is higher than thediffusion transmittance of the central portion. The inspection opticalsystem also has an image pick-up means to pick-up an image of theoptical member to be inspected, and is positioned so as to receive thatlight emitted from the light source and transmitted through thediffusing means and the optical member. A judging means is alsoprovided, for judging whether or not the optical member has a defect, inaccordance with image signals output from the image pick-up means.

Preferably, the diffusing means consists of a plane plate member, havingcentral and peripheral portions, extending substantially perpendicularto an optical axis of the image pick-up means. However, first and seconddiffusing plates, together determining the central and peripheralportions, could also be used as the diffusing means. The shapes of thecentral and peripheral portions, are preferably determined according tothe shape of the optical member to be inspected. In addition, it is alsopreferred that the central and peripheral portions are each variable inshape, and that the optical member inspection apparatus includes meansfor setting each shape.

The diffusing means preferably consists of a liquid crystal panel havinga plurality of segments, each segment having a diffusion transmittancethat can be varied according to a voltage applied thereto. The settingmeans sets the shape of the peripheral and central portions bycontrolling the voltage applied to each segment.

Preferably, a wavelength selecting means is provided for selecting awavelength of that light incident on the optical member. The wavelengthselecting means can vary the spectral transmittance of the central andperipheral portions.

In addition, a means for moving at least the diffusing means in adirection along the optical axis of the image pick-up means, ispreferably provided.

The diffusing means preferably consists of first and second diffusingplates, each placed approximately perpendicular to the optical axis ofthe image pick-up means, and each having a uniform diffusiontransmittance. The second diffusing plate is positioned at a center ofthe first diffusing plate so as to form the central portion. With suchan arrangement, the moving means can preferably move at least the seconddiffusing plate in the optical axis direction. However, the moving meanscould be selected to move both the light source and the diffusing means,as a whole, in the optical axis direction.

It is preferred that the optical member inspection apparatus also has ameans for moving the light source relative to the diffusing means, in adirection along the optical axis of the image pick-up means, so thatlight can be projected towards the diffusing means at a predeterminedemission angle.

It is also preferred that means are provided for moving at least thediffusing means in a direction perpendicular to the optical axis of theimage pick-up means, and that a lighting unit, consisting of the lightsource and the diffusing means, are moved, by the moving means, in thedirection perpendicular to the optical axis of the image pick-up means.

Using the optical member inspection apparatus of the present invention,there is provided a method for inspecting an optical member, consistingof firstly, positioning the diffusing means such that light transmittedthrough the optical member and picked-up by the image pick-up means,substantially corresponds to light transmitted through the centralportion of the diffusing means. Secondly, an image of the optical memberis input from the image pick-up means, and thirdly, according to theinput image, it is judged whether or not the optical member isdefective.

Preferably, the image pick-up means can be adjusted by adjustingmagnification.

The optical member inspection apparatus preferably further consists of ameans for displaying an image of the optical member picked-up by theimage pick-up means. A reference value storing means is also preferablyprovided, in which a value of a reference outline of the optical memberand a recommended magnification of the image pick-up means areregistered for each type of the optical member. A means for calculatinga reference frame using the reference outline value and the recommendedmagnification read from the reference value storing means, in accordancewith a type of the optical member, is also preferably provided. Inaddition, a means is preferably provided for calculating a magnificationof the image pick-up means, in order to make an outline of an image ofthe optical member, picked-up by the image pick-up means, coincide withthe reference frame. A means for adjusting the magnification of theimage pick-up means, according to the magnification calculated by themagnification calculating means, is also preferably provided.

The magnification adjusting means preferably consists of first andsecond storing means, for respectively storing a size of the outline ofthe picked-up image of the optical member, and a size of the referenceframe. By comparing the sizes stored in the first and second storingmeans, the magnification adjusting means adjusts the magnification ofthe image pick-up means.

In another aspect of the present invention an optical member inspectionapparatus is provided, in which light emitted from a lighting means andtransmitted through an optical member to be inspected is picked-up by animage pick-up means for inspecting a defect of the optical member. Thelighting means emits low and high luminance light towards the opticalmember. The low luminance light is emitted parallel to an optical axisof the image pick-up means, while the high luminance light is emittedinclined relative to the optical axis of the image pick-up means.

In a further aspect of the present invention, a method is provided forinspecting an optical member, in which light emitted from a light sourceis diffused by a diffusing means before being made incident on theoptical member. The light emitted from the optical member is picked-upby an image pick-up means. The diffusing means includes central andperipheral portions. The diffusion transmittance of the peripheralportion is higher than the diffusion transmittance of the centralportion. The method consists of firstly, inputting an image, includingan image of the optical member, from the image pick-up means. Secondly,the image of the optical member is separated from the input image.Thirdly, the image of. the optical member is binarized, using a primarythreshold value lower than an average luminance of the image of theoptical member. Fourthly, the image of the optical member is binarized,using a secondary threshold value higher than the average luminance ofthe optical member image, and fifthly, it is judged whether or not theoptical member is defective by taking first and second binarized signalsas defects of different types.

According to a further aspect of the present invention an optical memberinspection apparatus is provided consisting of a light source, and adiffusing means for diffusing light emitted from the light source. Thediffusing means consists of central and peripheral portions. Thediffusion transmittance of the peripheral portion is higher than thediffusion transmittance of the central portion. An image pick-up means,positioned to receive light emitted from the light source andtransmitted through the diffusing means and the optical member, is alsoprovided to pick-up an image of an optical member to be inspected. Theimage pick-up means is adjustable in magnification. A reference valuestoring means is provided, in which a value of a reference outline ofthe optical member and a recommended magnification of the image pick-upmeans are registered for each type of the optical member. A means forcalculating a reference frame using the reference outline value and therecommended magnification, read from the reference value storing means,in accordance with a type of the optical member, is also provided. Inaddition, a means for displaying the reference frame, superimposed on animage of the optical member picked-up by the image pick-up means, isprovided.

In a further aspect of the present invention, a method is provided forinspecting an optical member, in which light emitted from a light sourceis diffused by a diffusing means, consisting of central and peripheralportions, before being made incident on the optical member. Lightemitted from the optical member is picked-up by an image pick-up means.The diffusion transmittance of the peripheral portion is higher than theperipheral portion of the central portion. The method consists offirstly, inputting an image, including an image of the optical member,from the image pick-up means. Secondly, separating the optical memberimage from the input image. Thirdly, calculating a reference frame usinga value of a reference outline of the optical member and a recommendedmagnification of the image pick-up means. The calculated reference frameand the calculated recommended magnification are prestored according tothe type of the optical member. Fourthly, a magnification of the imagepick-up means is adjusted, so that an outline of an image of the opticalmember, picked-up by the image pick-up means, may coincide with thereference frame, and fifthly, it is judged whether or not the opticalmember is defective, according to an image of the optical memberpicked-up by the image pick-up means at the adjusted magnification.

According to a further aspect of the present invention, a method isprovided for inspecting an optical member, in which light emitted from alight source is diffused by a diffusing means, before being madeincident on the optical member. The light emitted from the opticalmember is picked-up by an image pick-up means. The diffusing meansincludes central and peripheral portions, with the diffusiontransmittance of the peripheral portion being higher than the diffusiontransmittance of the central portion. The method consists of theprocesses of firstly, inputting an image of the optical member from theimage pick-up means. Secondly, the input image is binarized and apreliminary separating operation is executed, in which the image of theoptical member is roughly separated from the input image according to aluminance distribution of the binarized input image. Thirdly, it isjudged whether or not the preliminary separating operation has beensuccessfully executed. If it is judged that the preliminary separatingoperation has been success the a main separating operation is executed,in which an image to be inspected is separated from the roughlyseparated image of the optical member, and fifthly, the separated imageto be inspected is binarized to judge whether or not the optical memberis defective.

Preferably, in the above method, the preliminary separating operation isexecuted such that a rectangular section, including the image of theoptical member, is separated from the input image, according to aluminance distribution in an X-axis direction and a Y-axis direction.The X-axis direction and the Y-axis direction being perpendicular witheach other.

It is preferred that the above-mentioned fifth process consists ofbinarizing the separated image to be inspected that is separated in thepreliminary separating operation, using a primary threshold value. Theprimary threshold value being lower than an average luminance of theseparated image to be inspected. Secondly, the separated image to beinspected that is separated in the preliminary separating operation isbinarized using a secondary threshold value. The secondary thresholdvalue being higher than the average luminance of the separated image tobe inspected, and thirdly, it is judged whether or not the opticalmember is defective by taking first and second binarized signals,obtained respectively through the two binarizing processes, as defectsof different types.

According to still another aspect of the present invention, an opticalmember inspection apparatus is provided including means for picking-upan image of an optical member to be inspected, to output the image ofthe optical member. The output image of the.optical member is binarizedby provided means, to. detect a suspected mold defect. A first pluralityof counters, each counting a number of appearances of the suspected molddefect at a common position on a plurality of optical members molded bya common mold, are also provided. When the number of appearances reachesa first predetermined number, means are provided for deciding that thesuspected mold defect appearing at the common position is a real molddefect.

Preferably, a second plurality of counters, are also provided, eachcounting the number of non-appearances of the suspected mold defect atthe common position during a period the suspected mold defect fails toappear, before the number of appearances has reached the firstpredetermined number. The number of the first plurality of counters isidentical to the number of second plurality of counters. First andsecond reset means are also provided, for respectively resetting onecounter in the first plurality of counters when the number ofnon-appearances in a corresponding counter in the second plurality ofcounters reaches a second predetermined number, and for resetting onecounter in the second plurality of counters when the suspected molddefect reappears at the common position before the number ofnon-appearances of the one counter in the second plurality of countershas reached the second predetermined number.

In yet another aspect of the present invention an optical memberinspection apparatus is provided consisting of means for picking-up animage of an optical member to be inspected, to output the image of theoptical member. Means for provided for binarizing the output image ofthe optical member to detect a suspected mold defect. A first pluralityof counters and a second plurality of counter are provided, for eachcounting a number of appearances of the suspected mold defect at acommon position on a plurality of optical members molded by a commonmold, and for each counting a number of non-appearances of the suspectedmold defect at the common position during a period the suspected molddefect fails to appear, before the number of appearances has reached afirst predetermined number, respectively. The number of the firstplurality of counters being identical to the number of second pluralityof counters. First and second reset means are provided for respectivelyresetting one counter in the first plurality of counters when the numberof non-appearances of a corresponding counter in the second plurality ofcounters reaches a second predetermined number, and for resetting onecounter in the second plurality of counters when the suspected molddefect reappears at the common position, before the number ofnon-appearances of the one counter in the second plurality of countershas reached the second predetermined number. Additionally, means areprovided for deciding that the suspected mold defect at the commonposition is a real mold defect, when the number of appearances reachesthe first predetermined number.

In another aspect of the present invention, a method is provided forseparating an image of a mark, formed on an optical member to beinspected, from an image of the optical member input from an imagepick-up means picking-up an image of the optical member. The methodconsists of firstly, binarizing the input image of the optical member todraw (extract) a figure corresponding to the mark or a defect of theoptical member from the binarized input image. Secondly, a binarizedimage of a reference mark having no defect is expanded. Thirdly, aprimary image is generated, including a figure corresponding to the markand a figure corresponding to the defect, the defect being located in avicinity of the figure corresponding to the mark, by executing an ANDoperation of the binarized input image and the expanded binarizedreference mark per pixel. Fourthly, the image of the mark is generatedby removing all figures of defects not connected to the figurecorresponding to the mark from the primary image, in accordance withinformation regarding the reference mark, and fifthly generating animage excluding the image of the mark, by extracting the image of themark generated from the binarized input image.

Preferably, the figures included in the primary image are numbered inorder of size from a largest to a smallest. The number of numberedfigures being identical to the number of reference marks. A non-numberedfigure or figures amongst the figures included in the primary image,being eliminated to thereby generate the image of the mark.

According to another aspect of the present invention, there is providedan optical member inspection apparatus for judging whether or not anoptical member to be inspected is defective. The optical member having amark formed thereon. The optical member inspection apparatus including ameans for picking-up an image of the optical member, to output an imageof the optical member. Means are provided for binarizing the image ofthe optical member, and for drawing (extracting) a figure correspondingto the mark or a defect of the optical member from the binarized inputimage. In addition means are provided for expanding a binarized image ofa reference mark having no defect. First, second and third generatingmeans are provided for respectively generating a primary image includingthe figure corresponding to the mark and a figure corresponding to thedefect, the defect being located in a vicinity of the figurecorresponding to the mark, by executing an AND operation of thebinarized input image and the expanded binarized reference mark perpixel, and for generating the image of the mark by removing all figuresof defects not connected to the figure corresponding to the mark fromthe primary image, in accordance with information regarding thereference mark, and for generating an image excluding the image of themark, by extracting the image of the mark generated by the secondgenerating means from the binarized input image. Additionally, means areprovided for judging whether or not the optical member is defective, inaccordance with at least one of the image of the mark generated by thesecond generating means and the image excluding the image of the markthat is generated by the third generating means.

Preferably, the third generating means numbers figures included in theprimary image in order of size from a largest to a smallest. The numberof numbered figures being identical to the number of reference marks. Inaddition, the third generating means eliminates a non-numbered figure,or figures, amongst the figures included in the primary image, tothereby generate the image of the mark.

In yet a further aspect of the present invention, there is provided amethod of inspecting a plurality of optical members, each optical memberbeing inspected by a plurality of types of inspection, to detect adefect. In this method, the type of inspection having the higherfrequency of detection of the defect, the earlier the type of inspectionis executed. The frequency of detection being statistically obtained.

Preferably, in the case where one optical member, amongst the pluralityof optical members to be inspected, is judged to be defective in onetype of inspection, the remaining types of inspection are not executedon the defective optical member.

According to yet another aspect of the present invention, there isprovided an optical member inspection apparatus for inspecting aplurality of optical members, each optical member being inspected by aplurality of types of inspection, to detect a defect. In this opticalmember inspection apparatus, the higher a frequency of detection of thedefect in one type of inspection, amongst the plurality of types ofinspection, is, the earlier that inspection is executed. The frequencyof detection being statistically obtained through an inspectingoperation.

In yet another aspect of the present invention, an optical memberinspection apparatus is provided having a plurality of image inputtingmeans provided respectively for a plurality of types of inspection.Means are provided for consecutively supplying an optical member to beinspected to respective image input positions of the plurality of imageinputting means, and means are provided for judging that the opticalmember is defective, when a defect of more than a predetermined value isdetected on the optical member in at least one type of inspectionamongst the plurality of types of inspection. A supply order controllingmeans for controlling the supplying means in accordance with a frequencyof existence of the defect for each of the plurality of types ofinspection, is provided. The frequency of existence being statisticallyobtained through an inspecting operation, so as to firstly supply theoptical member to one of the image input positions corresponding to atype of inspection in which a frequency of detection of the defect ishigher than any other type of inspection amongst the plurality of typesof inspection.

According to another aspect of the present invention, an optical memberinspection apparatus is provided consisting of means for picking-up animage of an optical member to be inspected, to output the image of theoptical member. Means for setting a plurality of areas to be inspectedin the image of the optical member, is also provided. One of theplurality of areas is an outermost area including a boundary linedefining a designed effective aperture of the optical member. Inaddition, means are provided for setting a criterion for judgement foreach of the plurality of areas, the criteria being different from oneanother. A criterion set for the outermost area is alleviative, comparedwith the other criteria. Means are also provided for judging whether ornot each of the plurality of areas is defective, in accordance with acorresponding criterion from the criteria set by the criterion settingmeans.

In a further aspect of the present invention, there is provided a methodof inspecting an optical member to judge whether or not the opticalmember is defective. A plurality of areas to be inspected are set in animage of the optical member, picked-up by an image pick-up means. Acriterion for judgement is set differently for each of the plurality ofareas. The method consisting of firstly, setting an outermost area,including a boundary line defining a designed effective aperture of theoptical member, as one of the plurality of areas. Secondly, the opticalmember for the outermost area is inspected with a predeterminedcriterion, from the set criteria. The predetermined criterion beingalleviative, compared with the other criteria.

According to another aspect of the present invention, there is providedan optical member inspection apparatus consisting of placing means forconsecutively placing each of a plurality of optical members to beinspected, firstly, at a first position, where each image of an opticalmember is picked-up, and subsequently at a second position, where eachoptical member is stamped with a predetermined mark. Means forpicking-up an image of each optical member at the first position, tooutput an image, are also provided. In addition, means are provided forjudging whether or not each optical member is defective, according tothe image of the optical member output from the image pick-up means, andmeans for stamping the predetermined mark on each optical member at thesecond position, depending on a judgement of the judging means regardingthe optical member, are also provided. The placing means conveys oneoptical member to be inspected, which has not yet been inspected, to thefirst position, while conveying another optical member to be inspected,which has been already inspected at the first position, to the secondposition.

Preferably, the stamping means stamps the mark only when the opticalmember is judged to be defective by the judging means.

In another aspect of the present invention, a method is providedincluding a first process of inspecting an optical member to judgewhether or not the optical member is defective, and a second process ofstamping a mark on the optical member depending upon a result of theinspection. The first and second processes are performed at differentpositions at the same time.

In yet another aspect of the present invention, a method of inspectionand marking is provided, consisting of inspection and marking process.In the inspection process, it is inspected whether or not an opticalmember to be inspected is at an inspection position. In the markingprocess a mark is stamped on the optical member at a marking position,different from the inspection position, according to a result ofinspection of the inspection process. An optical member to be inspected,which has not yet been inspected, is conveyed to the inspection positionwhile another optical member to be inspected, which has been alreadyinspected at the first position, is being conveyed to the secondposition.

According to a further aspect of the present invention, there isprovided a method of controlling a luminance of light emitted from alight source used in an inspection apparatus for inspecting an opticalmember. The light emitted from the light source is transmitted to meansfor picking-up an image of the optical member through the opticalmember, an image output from the image pick-up means beingimage-processed to obtain an image of the optical member. The methodconsists of firstly, forming a histogram showing a luminancedistribution of the image of the optical member by a number of pixels.Secondly, a threshold value is obtained according to a discriminantanalysis method, based on the histogram, and thirdly, the luminance oflight emitted from the light source is controlled, in accordance withthe threshold value.

In another aspect of the present invention, there is provided a methodof controlling a luminance of light illuminating an object to beinspected. The method consists of firstly, obtaining a threshold valueaccording to a discriminant analysis method, based on a histogram of animage of the object, and secondly of controlling the luminance of light,in accordance with the threshold value.

According to a further aspect of the present invention, an opticalmember inspection apparatus is provided having means for lighting anoptical member to be inspected. Means are also provided for picking-upan image of the optical member, lighted by the lighting means, to outputan image of the optical member. Means for image-processing the image ofthe optical member so as to inspect the optical member, are alsoprovided. In addition, there is provided means for forming a histogramwhich shows a luminance distribution of the image of the optical memberby a number of pixels, and means for obtaining a threshold valueaccording to a discriminant analysis method, based on the histogram, andfor controlling a luminance of light emitted from the lighting means inaccordance with the threshold value.

According to still another aspect of the present invention, an opticalmember inspection apparatus is provided, which picks-up an image of anobject to be inspected, lighted by lighting means, and judges whether ornot the object is defective according to the image of the object. Thelight emitted from the lighting means has a luminance distribution whichclearly differentiates between a luminance of an area to be inspected,including an image of the object, and a luminance of a background area,excluding the object image, in the image. The luminance of light emittedfrom the lighting means being controlled in accordance with a thresholdvalue obtained according to a discriminant analysis method.

The present disclosure relates to subject matter contained in Japanesepatent applications No.7-164825 (filed on Jun. 7, 1995), No.7-164826(filed on Jun. 7, 1995), No.7-164827 (filed on Jun. 7, 1995),No.7-172911 (filed on Jun. 15, 1995), No.7-175518 (filed on Jun. 19,1995), No.7-175519 (filed on Jun. 19, 1995), No.7-184795 (filed on Jun.28, 1995), No.7-189844 (filed on Jul. 3, 1995), No.7-189853 (filed onJul. 3, 1995), No.7-208398 (filed on Jul. 24, 1995), No.7-208399 (filedon Jul. 24, 1995), No.7-208400 (filed on Jul. 24, 1995), No.7-221120(filed on Aug. 7, 1995) and No.8-101834 (filed on Apr. 1, 1996) whichare expressly incorporated herein by reference in their entireties.

BRIEF DESCRIPTION OF THE DRAWINGS

The invention will be described below in detail with reference to theaccompanying drawings, in which similar parts are indicated by likereference numerals, and wherein:

FIG. 1 is a schematic view of an overall construction of an opticalsystem and a block diagram of a processing system of a first embodimentof an optical member inspection apparatus according to a first aspect ofthe present invention;

FIGS. 2(A-1),(A-2),(B-1) and (B-2) are schematic views of the apparatusof FIG. 1, showing plan shapes of objects to be inspected and planshapes of diffusing means;

FIGS. 3(A) and (B) are illustrative schematic views showing examples ofoptical paths in the optical system of FIG. 1, when a lens to beinspected is set;

FIG. 4 is a schematic view of images of lenses to be inspected having nodefect, picked-up by the apparatus of FIG. 1;

FIG. 5 is a schematic view of images of lenses to be inspected having anabsorptive defect, picked-up by the apparatus of FIG. 1;

FIG. 6 is a schematic view of images of lenses to be inspected having ascatterable defect, picked-up by the apparatus of FIG. 1;

FIGS. 7(A)-(C) are examples of distributions of luminance on a scanningline of an image picked-up by the apparatus of FIG. 1, wherein (A) is asignal of the original image, (B) is a binarized signal of a lowluminance portion, and (C) is a binarized signal of a high luminanceportion;

FIG. 8 is an illustrative schematic view of optical paths in the opticalsystem of FIG. 1, when the lens to be inspected is not set;

FIG. 9 is a schematic view according to the structure of FIG. 1, whereina negative lens is inspected by the apparatus of the first embodiment ofthe first aspect of the present invention;

FIG. 10 is a schematic perspective view showing positive lenses moldedby a four-cavity mold and connected to runners, as an example of objectsto be inspected;

FIG. 11 is a front elevational view of an example of the structure ofthe optical system of the first embodiment of the first aspect of thepresent invention;

FIG. 12 is a longitudinal sectional view of the apparatus shown in FIG.11;

FIG. 13 is a sectional view of a lighting unit of the apparatus shown inFIG. 11;

FIGS. 14(A)-(C) are plan views showing structures of diffusing means ofthe apparatus shown in FIG. 11;

FIG. 15 is a schematic view showing a relationship between lenses to beinspected, in a state connected to runners, set in a lens supportingunit of the apparatus shown in FIG. 11, and inspection optical systemson the right and left of the apparatus;

FIG. 16 is a flow chart showing the Inspection Routine of the apparatusshown in FIG. 11;

FIG. 17 is a flow chart showing an Inspection Portion SeparationSubroutine of the Inspection Routine shown in FIG. 16;

FIG. 18 is a schematic view showing an image of a lens set to beinspected, and distribution of projection thereof;

FIG. 19 is a schematic view showing an image of a lens not set to beinspected, and distribution of projection thereof;

FIG. 20 is a flow chart showing a Binary Coding Subroutine of theInspection Routine shown in FIG. 16;

FIG. 21 is a flow chart showing a Mark Separation Subroutine of theInspection Routine shown in FIG. 16;

FIGS. 22(A)-(F) are schematic views of binary images showing a markseparation process;

FIG. 23 is a flow chart showing a Mark Judgement Subroutine of theInspection Routine shown in FIG. 16;

FIG. 24 is a flow chart showing a Mold Mark Detection Subroutine of theInspection Routine shown in FIG. 16;

FIG. 25 is a flow chart showing a Mold Mark Control Subroutine of theInspection Routine shown in FIG. 16;

FIG. 26 is a schematic view of an overall construction of an opticalsystem and a block diagram of a processing system of a second embodimentof an optical member inspection apparatus, according to the first aspectof the present invention;

FIGS. 27(A-1),(A-2),(B-1) and (B-2) are comparative schematic views ofthe apparatus shown in FIG. 26, showing plan shapes of objects to beinspected and plan shapes of diffusing means;

FIG. 28 is a schematic view according to the structure shown in FIG. 26,when a negative lens is inspected by the apparatus of the secondembodiment of the first aspect of the present invention;

FIG. 29 is a flow chart showing an Inspection Routine of the apparatusshown in FIG. 26;

FIG. 30 is a schematic view of an overall construction of an opticalsystem and a block diagram of a processing system of a third embodimentof an optical member inspection apparatus, according to the first aspectof the present invention;

FIG. 31 is a schematic view according to the structure shown in FIG. 30,when a negative lens is inspected by the apparatus of the thirdembodiment of the first aspect of the present invention;

FIG. 32 is a flow chart showing an Inspection Routine of the apparatusshown in FIG. 30;

FIG. 33 is a schematic view of an overall construction of an opticalsystem and a block diagram of a processing system of a fourth embodimentof an optical member inspection apparatus, according to the first aspectof the present invention;

FIGS. 34(A)-(B) are schematic views showing an example of an adjustmentof the distance between a lighting unit and a lens to be inspected ofthe apparatus shown in FIG. 33;

FIGS. 35(A)-(B) are schematic views showing an example of an adjustmentof the distance between a second diffusing plate and a lens to beinspected of the apparatus shown in FIG. 33;

FIG. 36 is an example of a distribution of luminance on a scanning lineof an image in the case of a relatively large ratio of light beingemitted from a peripheral portion of the diffusing means to be incidenton a lens to be inspected, wherein (A) is a signal of the originalimage, (B) is a binarized signal of a low luminance portion, and (C) isa binarized signal of a high luminance portion;

FIG. 37 is a schematic view of a signal of an original image showing adistribution of luminance on a scanning line in the case of a relativelysmall ratio of light being emitted from a peripheral portion of thediffusing means to be incident on a lens to be inspected;

FIG. 38 is a sectional view showing an example of a structure of alighting unit of the apparatus shown in FIG. 33;

FIG. 39(A) is a flow chart showing- an Inspection Routine of theapparatus shown in FIG. 33, and

FIG. 39 (B) is a flow chart showing an Adjustment Routine thereof;

FIG. 40 is a schematic view of an overall construction of an opticalsystem and a block diagram of a processing system of a fifth embodimentof an optical member inspection apparatus, according to the first aspectof the present invention;

FIGS. 41(A)-(C) are schematic views showing a variation of in theprojection range of light from a diffusing means according to avariation in distance between a light source and the diffusing means;

FIG. 42 is a sectional view showing an example of a structure of alighting unit of the apparatus shown in FIG. 40;

FIG. 43(A) is a flow chart showing an Inspection Routine of theapparatus shown in FIG. 40, and

FIG. 43(B) is a flow chart showing an Adjustment Routine thereof;

FIG. 44 is a schematic view of an overall construction of an opticalsystem and a block diagram of a processing system of a sixth embodimentof an optical member inspection apparatus, according to the first aspectof the present invention;

FIG. 45 is a schematic view showing a positioning of an optical systemfor inspection of a lens not having a prismatic function by theapparatus shown in FIG. 44;

FIGS. 46(A)-(B) are schematic views of optical paths in the opticalsystem shown in FIG. 44, for lenses to be inspected being set;

FIG. 47 is a schematic view of an optical path during inspection of awedge prism by the apparatus shown in FIG. 44;

FIG. 48 is a front elevational view of an example of the structure inthe sixth embodiment of the first aspect of the present invention;

FIG. 49 is a longitudinal sectional view of the apparatus shown in FIG.48;

FIG. 50 is a sectional view of a lighting unit of the apparatus shown inFIG. 48;

FIG. 51 is a schematic view showing a relationship between lenses to beinspected, in a state connected to runners, set in a lens supportingunit of the apparatus shown in FIG. 48, and inspection optical systemson the right and left of the apparatus;

FIG. 52 is a schematic view showing a block diagram of a processingsystem of a first embodiment of an optical member inspection apparatus,according to a second aspect of the present invention;

FIG. 53 is a schematic view of an optical system of an optical memberinspection apparatus in the first embodiment of the second aspect of thepresent invention;

FIG. 54 is a flow chart showing an Inspection Routine of the apparatusof the first embodiment of the second aspect of the present invention;

FIG. 55 is a schematic view showing a block diagram of a processingsystem of a second embodiment of an optical member inspection apparatus,according to the second aspect of the present invention;

FIG. 56 is a schematic view of an example of an indication on a monitordisplay of the apparatus of the second embodiment of the second aspectof the present invention;

FIG. 57 is a schematic view of an overall construction of optical systemand a block diagram of a processing system of an embodiment of anoptical member inspection apparatus, according to a third aspect of thepresent invention;

FIG. 58 is a flow chart showing an Inspection Routine of the embodimentof the third aspect of the present invention;

FIG. 59 is a schematic view showing a block diagram of a processingsystem of an embodiment of an optical member inspection apparatus,according to a fourth aspect of the present invention;

FIG. 60 is a schematic view of an optical system of an optical memberinspection apparatus of the embodiment of the fourth aspect of thepresent invention;

FIG. 61 is a flow chart showing an Inspection Routine of the apparatusof the fourth aspect of the present invention;

FIG. 62 is a schematic view showing a block diagram of a processingsystem of an embodiment of an optical member inspection apparatus byusing a mark separation method, according to a fifth aspect of thepresent invention;

FIG. 63 is a schematic view of an optical system of the optical memberinspection apparatus of the embodiment of the fifth aspect of thepresent invention;

FIG. 64 is a flow chart showing an Inspection Routine of the apparatusof the embodiment of the fifth aspect of the present invention;

FIG. 65 is a schematic view showing a block diagram of a processingsystem of an embodiment of an optical member inspect ion apparatus,according to a sixth aspect of the present invention;

FIG. 66 is a schematic view of an optical system of the optical memberinspection apparatus of the embodiment of the sixth aspect of thepresent invention;

FIG. 67 is a flow chart showing an Inspection Routine of the apparatusof the embodiment of the sixth aspect of the present invention;

FIG. 68 is a flow chart showing an Order Setting Subroutine of theInspection Routine shown in FIG. 67;

FIG. 69 is a schematic view showing a block diagram of a processingsystem of an embodiment of an optical member inspection apparatus,according to a seventh aspect of the present invention;

FIG. 70 is a schematic view showing a setting of an outermost peripheralinspection portion of the optical member inspection apparatus of theembodiment of the seventh aspect of the present invention;

FIG. 71 is a schematic view of an optical system of the optical memberinspection apparatus of the embodiment of the seventh aspect of thepresent invention;

FIG. 72 is a flow chart showing an Inspection Routine of the apparatusof the embodiment of the seventh aspect of the present invention;

FIG. 73 is a flow chart showing a Judgement Subroutine in the InspectionRoutine shown in FIG. 72;

FIG. 74 is a schematic view showing a block diagram of a processingsystem of an embodiment of an optical member inspection apparatus havinga marking function, according to an eighth aspect of the presentinvention;

FIG. 75 is a schematic perspective view showing an example ofpositioning of each means of the optical member inspection apparatus ofthe embodiment of the eighth aspect of the present invention;

FIG. 76 is a schematic view of an optical system of an optical memberinspection apparatus of the embodiment of the eighth aspect of thepresent invention;

FIG. 77 is a schematic combination view showing a block diagram of anoptical system and a processing system of an embodiment of an opticalmember inspection apparatus by using a lighting luminance controlprocess, according to a ninth aspect of the present invention;

FIG. 78 is a graphic chart of an example of a histogram of an imagepicked-up by the apparatus of the embodiment of the ninth aspect of thepresent invention;

FIG. 79 is a graphic chart when the histogram shown in FIG. 78 shifts toa side of low luminance;

FIG. 80 is a graphic chart when the histogram shown in FIG. 78 shifts toa side of high luminance;

FIG. 81 is a graphic chart of a further example of a histogram of animage picked-up by the apparatus of the embodiment of the ninth aspectof the present invention;

FIG. 82 is a graphic chart when a scatterable defect exists in thehistogram shown in FIG. 81;

FIG. 83 is a graphic chart of still a further example of a histogram ofan image picked-up by the apparatus of the embodiment of the ninthaspect of the present invention; and

FIG. 84 is a flow chart showing an Inspection Routine of the apparatusof the embodiment of the ninth aspect of the present invention.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

FIG. 1 illustrates an overall construction of an optical system and ablock diagram of a processing system of a first embodiment of an opticalmember inspection apparatus

This first embodiment is characterized in that the optical memberinspection apparatus has a light source, and a diffusing means fordiffusing the light emitted from the light source. The diffusing meanshas a central portion and a peripheral portion. The diffusiontransmittance of the peripheral portion is higher than the diffusiontransmittance of the central portion. An image pick-up means is providedto pick-up an image of the optical member to be inspected, and ispositioned so as to receive that light emitted from the light source andtransmitted through the diffusing means and the optical member. Ajudging means is also provided, for judging whether or not the opticalmember has a defect, in accordance with image signals output from theimage pick-up means.

Since the diffusing means is provided with a unique diffusiontransmittance as noted above, light which is emitted from the centralportion of the diffusing means, parallel to the optical axis, isincident upon the optical member to be inspected, and light which isemitted from the peripheral portion of the diffusing means, inclinedrelative to the optical axis, is also incident on the optical member tobe inspected. However, the image of the optical member that is formed onthe image pick-up means is mainly formed by the light emitted from thecentral portion, and thus the light emitted from the peripheral portionhardly affects the formation of the image on the image pick-up means.

However, if dust exists which absorbs light, e.g., a dark orblack-colored dust, in or on the optical member to be inspected, theportion of the image that corresponds to the light absorbing dust willappear darker (i.e., luminance is lower) than the surrounding portion ofthe image, which surrounds the darker portion. On the other hand, ifdust exists which scatters or diffuses light, e.g., a flaw orwhite-colored dust, in or on the optical member to be inspected, thebeam of light that is emitted from the central portion and incident onthe light scattering defect is scattered at the point of the lightscattering defect. However, at the same time, the beam of light that isemitted from the peripheral portion and incident on the light scatteringdefect is also scattered at the light scattering defect to thereby reachthe image pick-up means. Consequently, the portion of the image thatcorresponds to the light scattering defect will appear brighter (i.e.,luminance is higher) than the surrounding portion of the image, whichsurrounds the brighter portion. Therefore, it is possible tosimultaneously detect different types of defects, i.e., a lightabsorbing type of defect and a light scattering type of defect, from asingle image of the optical member to be inspected, based on the averageluminance of the original image of the optical member.

In the embodiments of the first aspect of the present invention, anoptical member made of plastic (i.e., a plastic lens) is preferablydesignated to be the subject to be inspected by the optical memberinspection apparatus. The optical system of the first embodiment willnow be described with reference to FIG. 1.

The optical system of the inspection apparatus has a light source 10, adiffusing means 20 consisting of a first diffusing plate 21 and a seconddiffusing plate 22, which diffuses light emitted from the light source10. A CCD camera 30 serves as an image pick-up means for picking-up animage incident thereon. The light transmitted through the diffusingmeans 20 is transmitted through a positive lens 1, i.e., the lens to beinspected, before reaching the CCD camera 30.

The light source 10 and the lens 1 to be inspected are positioned alongan optical axis Ax of the CCD camera 30. The CCD camera 30 basicallyconsists of an objective lens 31 and a CCD sensor 32, and is adjusted insuch a manner that a focusing plane P is positioned on the approximatecentral position of the lens 1 (in the direction of the thickness of thelens). The focusing plane P and an image receiving area of the CCDsensor 32 are optically conjugate via the objective lens 31. An image ofthe lens 1 positioned on the focusing plane P, is formed within the areaindicated by O, i.e., lens image forming area, in FIG. 1 on the CCDsensor 32.

In order for the CCD camera 30 to receive a sufficient quantity oflight, it is preferable to provide a condenser lens, between thediffusing means 20 and the CCD camera 30. In the present embodiment thepositive lens 1 functions as a condenser lens.

An image output from the CCD camera 30 is processed by an imageprocessing apparatus 40. The image processing apparatus 40 has a judgingmeans which judges whether the lens 1 to be inspected is defective.Information regarding the lens 1 is displayed on a monitor display 50,which serves as a display means.

The shapes of the first and second diffusing plates 21, 22 areapproximately the same as the shape of the lens 1 (when viewed fromabove, as shown in FIG. 2, hereinafter referred to as the plan shape),although the second diffusing plate 22 is smaller than the firstdiffusing plate 21. The size of the second diffusing plate 22 is made toapproximately coincide with the size of the lens 1. With such anarrangement, all light emitted perpendicularly from the central portionof the diffusing means 20 is incident on the lens 1, while that lightemitted perpendicularly from a peripheral portion of the first diffusingplate 21 does not pass through the second diffusing plate 22, and is notincident on the lens 1. The reason that the plan shape of the firstdiffusing plate 21 is similar to the lens 1, is so that that lightemitted obliquely from the peripheral portion of the diffusing means 20may be incident equally on the lens 1.

The centers of the first and the second diffusing plates 21, 22 coincidewith each other, and are positioned perpendicular to the optical axis Axof the CCD camera 30. The diffusing plates 21 and 22 may have anidentical or a different diffusion transmittance, but if the diffusingmeans 20 is considered as a whole, in the central portion where thefirst and second diffusing plates are overlaid, the diffusiontransmittance is low, while in the peripheral portion where thediffusing plates 21 and 22 are not overlaid, the diffusion transmittanceis relatively high.

FIG. 2 illustrates examples of plan shapes of lenses to be inspected andthe diffusing plates 21, 22. As shown in FIG. 2(A-1), if the lens to beinspected is a lens la for a finder having a rectangular plan shape, itis preferable that the plan shapes of the first and second diffusingplates 21 a, 22 a are also rectangular as shown in FIG. 2(A-2). While,if the lens to be inspected is a circular lens 1 b as shown in FIG.2(B-1), it is preferable that the plan shapes of the diffusing plates 21b, 22 b are circular as shown in FIG. 2(B-2). “R” in FIG. 2 indicates arunner provided on the multi-cavity mold, and “G” indicates a gate intowhich molten material is poured to form the lens. In addition, 1 c and 1d, respectively shown in FIGS. 2(A-1) and (B-1), indicate parts used forsupporting the lens.

Note that since the inspection apparatus of the present embodiment isdesigned to inspect a plastic lens, molded by a multi-cavity mold,without cutting the runner away therefrom, the lens to be inspected isconnected to the runner R via the gate G as shown in FIG. 2.

FIG. 3 is an illustrative schematic view showing examples of opticalpaths between the light source 10 and the CCD sensor 32 when the lens 1to be inspected is set in a position to be inspected. FIG. 3(A) shows anoptical path of that light emitted perpendicularly from the diffusingmeans 20, and FIG. 3(B) shows an optical path of that light emittedobliquely from the diffusing means 20. That light incident upon the lensimage forming area O (i.e., that portion of the CCD sensor 32 on whichthe image of the lens 1 is formed) of the CCD sensor 32, is limited tosubstantially only low luminance light transmitted through the seconddiffusing plate 22, and therefore the luminance of the lens imageforming area O is lower than the rest of the area of the CCD sensor 32.

As shown in FIG. 3(A), that light emitted perpendicularly from thecentral portion of the diffusing means 20, i.e., Lvc (indicated by chaindouble-dashed lines in FIG. 3(A)), is transmitted through the lens 1 andthe objective lens 31, to form an image of the lens 1 on the lens imageforming area O of the CCD sensor 32. On the other hand, that lightemitted perpendicularly from the peripheral portion of the diffusingmeans 20, i.e. Lvp (indicated by dashed lines in FIG. 3(A)), does notpass through the lens 1, and is incident upon the CCD sensor 32 outsidethe lens image forming area O, after passing through the objective lens31.

As shown in FIG. 3(B), that light emitted obliquely from the centralportion of the diffusing means 20, i.e., Loc (indicated by the chaindouble-dashed lines in FIG. 3(B)), is transmitted through the lens 1 andthe objective lens 31, to form an image of the lens 1 on the lens imageforming area O of the CCD sensor 32. On-the other hand, that lightemitted obliquely from the peripheral portion of the diffusing means 20,i.e., Lop (indicated by the dashed lines in FIG. 3(B)), and transmittedthrough the lens 1, is not incident on the objective lens 31, i.e., isnot incident on the lens image forming area O. While that part of thelight Lop which is not transmitted through the lens 1 is incident on theCCD sensor 32 outside the lens image forming area O, after passingthrough the objective lens 31.

In the examples shown in FIG. 3, low luminance light emitted from thecentral portion of the diffusing means 20 and transmitted through thelens 1, is incident on the lens image forming area O of the CCD sensor32, and high luminance light emitted from the peripheral portion of thediffusing means 20 and passing in the vicinity of the lens 1, but notpassing through the lens 1, is incident on a peripheral portion of theCCD sensor 32, i.e., outside the lens image forming area O. Therefore,in the image picked-up by the CCD sensor 32, as shown in FIG. 4, therecontain high luminance background areas B, substantially formed by thathigh luminance light incident on the peripheral portion of the CCDsensor 32 without having been transmitted through the second diffusingplate 22, and the image of the lens 1 to be inspected (lens imageforming area O) S, i.e., the inspection portion, formed by that lowluminance light transmitted through the central portion of the diffusingmeans 20.

If the lens 1 to be inspected contains a defect, in the form of blackdust (i.e., an absorptive defect) for example, that light emitted fromthe central portion of the diffusing means, i.e., Lvc or Loc, whichforms an image of the lens 1, will be partially absorbed by the defect,and thus will not be incident on the CCD sensor 32. Therefore, defectimages D_(L), having a luminance lower than that of the inspectionportion (image of the lens) S, are formed within the inspection portionS, as shown in FIG. 5.

On the other hand, if the lens 1 contains a defect, in the form of whitedust or a flaw (i.e., a scatterable defect) for example, that lightincident on the surface of the lens 1 will be scattered by such adefect, namely, part of that high luminance light emitted obliquely fromthe diffusing means 20, i.e., the light Lop, which is usually notincident on the lens image forming area O of the CCD sensor 32, willbecome incident on the lens image forming area O due to the scatterabledefect, and thus defect images D_(H) having a luminance higher than thelens image S will be formed, as shown in FIG. 6.

If a low luminance image. D_(L), due to the absorptive defect, and ahigh luminance image D_(H), due to the scatterable defect, are formed ona scanning line in the X-axis direction, a sequence of pixels along thescanning line can be output as shown in FIG. 7(A). The image processingapparatus 40 is capable of separately coding the two different types ofdefects as respectively shown in FIGS. 7(B) and (C), by binarizationusing two threshold values SH1 and SH2.

As described above, by arranging the distribution of light emitted fromthe light source into two stages, i.e., by using two diffusing plates21, 22, and by additionally forming the shape of the second diffusingplate 22 to be similar to the plan shape of the lens 1 to be inspected,within the inspection portion S having a luminance lower than that ofthe background area B, it is possible to recognize a defect as being anabsorptive defect, as the image D_(L) having a luminance lower than theinspection portion S, or as a scatterable defect, as the image D_(H)having a luminance higher than that of the inspection portion S.Therefore, it is possible to simultaneously detect different types ofdefects from a single image of the lens to be inspected.

However, if the distribution of light emitted towards the lens 1 to beinspected is uniform, and if a scatterable defect exists, the quantityof light distributed is attenuated due to the light being scattered atthe position of the scatterable defect, and it is detected as a lowluminance portion, similar to the case of an absorptive defect on theCCD sensor 32. Therefore, it is impossible to judge the type of defectfrom a single image data.

During an inspection of a lens, since the criteria for judging whether alens is defective may vary according to the type of defect to bedetected, it is necessary to judge the type of defect thereof, and so ifit is possible to judge the type of defect in a single inspection, as inthe present embodiment, the inspection process can be simplified.

If a lens to be inspected is not set in place, in relation to that lightemitted perpendicularly from the diffusing means 20, as shown in FIG.8(A), that light emitted perpendicularly from the central portion of thediffusing means 20, i.e., the light Lvc (indicated by chaindouble-dashed lines in FIG. 8(A)), is incident on a central portion ofthe CCD sensor 32, while that light emitted perpendicularly from theperipheral portion of the diffusing means 20, i.e., the light Lvp(indicated by dashed lines in FIG. 8(A)), is incident on a peripheralportion of the CCD sensor 32. Regarding that light emitted obliquelyfrom the diffusing means 20, as shown in FIG. 8(B), that light emittedobliquely from a central portion of the diffusing means 20, i.e., thelight Loc (indicated by chain double-dashed lines in FIG. 8(B)), andthat light emitted obliquely from a peripheral portion of the diffusingmeans 20, i.e., the light Lop (indicated by dashed lines in FIG. 8(B)),are substantially made incident on the CCD sensor 32 at randompositions.

Therefore, if the lens to be inspected is not set in place, asubstantially uniform distribution of light on the CCD sensor 32 isobtained.

FIG. 9 illustrates the structure of an optical system in regard to theoptical member inspection apparatus according to the first embodiment ofthe present invention, during an inspection of a negative lens 2.

In the example shown in FIG. 1, since the inspected positive lens 1functions as a condenser lens, that light which is transmitted throughthe first and second diffusing plates 21 and 22, and through the lens tobe inspected 1, is converged towards the CCD camera 30. On the otherhand, if the lens to be inspected is a negative lens 2, in the case ofthe structure shown in FIG. 1, that light which is transmitted throughthe negative lens 2 will be scattered, and thus that light transmittedthrough the negative lens to be inspected may not be effectively madeincident on the CCD camera 30, and thus there is a possibility that thequantity of light is insufficient to be picked-up.

It is for this reason that between the diffusing means 20 and thenegative lens 2 to be inspected, a positive adjusting lens 3, serving asa condenser lens, is positioned to converge (in advance) light to beincident on the negative lens 2, so that light transmitted through thenegative lens 2 may travel towards the CCD camera 30.

A composite focal length of a lens system f, consisting of two thinlenses, provided that the focal length of each lens is f1 and f2respectively, and the distance between the lenses is d, is commonlydetermined by the following formula:

f=(f 1+f 2−d)/(f 1×F 2).

Supposing that f1 represents the focal length of the negative lens 2 tobe inspected, f2 represents the focal length of the adjusting lens 3,and d represents the distance between the adjusting lens 3 and thenegative lens 2, the focal length f2 of the adjusting lens 3 and thedistance between the lenses d may be determined so that the compositefocal length f may be fixed within a range that that light transmittedthrough the negative lens 2 may be effectively made incident upon theCCD camera 30.

For an efficient operation of the apparatus, it is preferable that thedistance between the diffusing plates 21, 22 and the negative lens 2 isconstant, and therefore the focal length f2 is fixed by specifying thedistance between the lenses d so that the adjusting lens 3 may bepositioned between the diffusing plates 21, 22 and the negative lens 2.

In the case where the adjusting lens 3 is positioned between thediffusing means 20 and the negative lens 2, it will be necessary todesign the size of the second diffusing plate 22 to be larger than theone shown in FIG. 1, in order to make only a part of that light emittedperpendicularly from the central portion of the diffusing means 20 andtransmitted through the second diffusing plate 22 incident on thenegative lens 2, similar to the example shown in FIG. 1.

The following description of the present embodiment will be made inregard to an optical member inspection apparatus having two inspectionoptical systems respectively provided on the right and left thereof,according to the above arrangement. The structure of the apparatus inthe present embodiment is such that a plural number of lenses 1 to beinspected, molded by a multi-cavity mold (in this case, a mold havingfour cavities) as shown in FIG. 10, may be inspected without beingremoved from a spool Sp and runners R.

As illustrated in FIGS. 11 and 12, in a main apparatus (lens inspectionapparatus) 100, a first guide rail member 110, a second guide railmember 111, and a third guide rail member 112 are positioned in theX-axis direction, parallel to the direction of the optical axis Ax. Onboth of each the first and second guide rail members 110, 111 a CCDcamera 30 and a lighting unit 120 are mounted, each being independentlymovable in the X-axis direction. The first and second guide rail members110, 111 are supported by a position adjusting means 113 fixed to themain apparatus 100, and are separately adjustable along the Y-axisdirection, perpendicular to the X-axis direction.

Both on the first and second guide rail members 110, 111, auxiliary lensunits 130 are detachably mounted, and marking units 140 are also mountedto stamp an inspected defective lens.

On the third guide rail member 112, a light source unit 150 and a CCDcamera 151 are slidably mounted in the X-axis direction, and constitutea reading unit to read a molded lens identification number N marked onthe runners R holding the lenses 1 to be inspected.

On a base 101 of the main apparatus 100, a lens supporting unit 160,which supports the lens 1 to be inspected (while connected to the runnerR), is slidably mounted on a rail 161 laid in the Z-axis direction. Atthe top end of the supporting unit 160, a tapered insertion bore (notshown) is formed in order to insert the spool Sp.

In the lighting unit 120, as illustrated in FIG. 13, an optical fiber122, which transmits light from the light source 10, is introduced tothe inside of a casing 121 of the lighting unit 120, via the bottom ofthe casing 121, and at an upper opening of the casing 121, the diffusingmeans 20, in the form of a single plate, is mounted. The central portionof the diffusing means 20 (corresponding to the second diffusing plate22 and the central portion of the first diffusing plate 21) has a lowdiffusion transmittance, and the peripheral portion of the diffusingmeans 20 (corresponding to the peripheral portion of the first diffusingplate 21) has a high diffusion transmittance. A variety of diffusingmeans 20, in the form of plates, are prepared so as to correspond to theplan shape of the lens to be inspected.

One end of the optical fiber 122 is secured to the casing 121 by a setscrew 123, and by loosening the set screw 123 it is possible to vary thelength of insertion of the optical fiber 122 within a range indicated bythe solid and broken lines in FIG. 13. Since the emission angle of lightemitted from the optical fiber 122 is fixed, if the length of insertionof the optical fiber 122 is varied, an effect similar to that caused byvarying the distance between the light source 10 and the diffusing means20 will result, and therefore the ratio of the emissive quantity oflight from the central and peripheral portions of the diffusing means 20can be adjusted.

The first diffusing plate 21 of each diffusing means 20 has a standardshape which is positioned in the upper opening of the lighting unit 120,as shown in FIG. 14(A). On the surface of the first diffusing plate 21the sheet-shaped second diffusing plate 22, which defines the centralportion of the diffusing means, is adhered, as shown in FIG. 14(B). Alight intercepting mask 23, which intercepts light outside the outerperiphery of the peripheral portion of the diffusing means, is thenadhered as shown in FIG. 14(C).

FIG. 15 is a schematic view illustrating the position of the lenses 1 tobe inspected when set in the lens supporting unit 160 in the state whenconnected to the runners R, and the inspection optical systems (providedon the right and left of the apparatus). The lenses 1 are held in such amanner that the end of the spool Sp is inserted into the insertion boreat the top end of the lens supporting unit 160, and are rotativelysupported around a rotational axis Ax3, which is parallel to the opticalaxes Ax1 and Ax2 of the left and right inspection optical systems. Thedistance between the optical axes Ax1 and Ax2 is adjustable by operatingthe position adjusting means 113. By adjusting the distance between theaxes Ax1 and Ax2, each of the axes Ax1 and Ax2 is adjusted so that theyapproximately coincide with the optical axes of the lenses 1 to beinspected.

The following description will be made in regard to the initial settingof the two inspection optical systems. Both inspection optical systemsare designed to be capable of inspecting under different focalconditions, i.e., the focal point of each optical system can bedifferent, on the assumption that the dust or flaw to be inspected islocated along different positions in the optical axes Ax1 and Ax2.

If a lens to be inspected is a lens for a finder on which a mark (e.g.,a visual field frame which specifies the range of a visual field of afinder, or an AF frame) is formed on a plane surface of the lens, forexample, the criteria used for judging whether there is a defect on theplane surface of the lens is stricter than that used to judge whetherthere is a flaw or dust at any other position on or in the lens, sinceis not desirable for a finder frame or an AF frame to be viewed togetherwith a defect through a view finder. Thus, it is preferable that thedepth of field of one of the inspection optical systems is capable ofbeing reduced so that only the defect on the plane surface may beenhanced, and therefore such a defect may be detected separate fromanother defect.

Therefore, in the case of inspecting such a lens for a finder, byfocusing on the plane surface in such a manner that the depth of fieldof the left inspection optical system is reduced (i.e., the aperture isopened wider), the purpose of the left inspection optical system is tosolely enhance the defect on the plane surface of the lens, and at thesame time, the depth of field of the right inspection optical system maybe increased (e.g., F=11), so as to detect dust and flaws at positionsother than the plane surface of the lens to be inspected.

According to the setting of the focal condition (aperture) as mentionedabove, each inspection optical system has a different ratio of high tolow luminance of light, i.e., the ratio of light emitted from theperipheral and central parts of the diffusing means 20. Namely, in theleft inspection optical system (wide aperture), the ratio of highluminance light (i.e., that light emitted from the peripheral portion ofthe diffusing means 20) is relatively high compared to the low luminancelight emitted from the central portion, while in the right inspectionoptical system (small aperture), the ratio of low luminance lightemitted from the central portion is relatively high.

In the case that the ratio of light emitted from the peripheral portionof the diffusing means is high and the ratio of light emitted from thecentral portion is low, the average luminance of the lens image formingportion will be low, while in the case of having a scatterable defectwhich scatters incident light, the difference between the averageluminance and that light having high luminance incident on the defectwill become wider, and therefore the ability to inspect a scatterabledefect will increase. However, since the average luminance is low, inthe case of having an absorptive defect which absorbs incident light,the difference between the average luminance and that light having lowluminance incident on the defective part will become narrower, andtherefore the ability to inspect for the absorptive defect willdecrease.

On the other hand, in the case that the ratio of light from theperipheral portion is rather low and the ratio of light from the centralportion is rather high, the average luminance of the lens image formingportion will increase, while in the case of the existence of anabsorptive defect which absorbs incident light, the difference betweenthe average luminance and that light having low luminance incident onthe defect will become wider, and therefore the ability to inspect foran absorptive defect will increase. In this case however, the ability toinspect for a scatterable defect will decrease.

The ratio of light emitted from the central and peripheral portions ofthe diffusing means, can be varied, not only by altering the focalconditions (i.e., aperture), but also by varying the position of theemission end of the optical fiber 122 in the lighting unit 120, or bymoving the whole of the lighting unit 120 in the X-axis direction.

The following discussion will be directed towards an inspectingoperation using the above apparatus of the present embodiment, withreference to the accompanying flow charts. To prepare for the inspectionof a lens, information regarding the lens to be inspected is loaded inthe form of a data table in a controller 170, consisting of a computeror the like, connected to the main apparatus 100. In addition,appropriate diffusing plates are selected according to the information,and at the same time the magnification of the CCD camera 30 isappropriately set.

Inspection Routine

The overall inspection routine of the present embodiment is shown in theflow chart of FIG. 16. At A-1, a picked-up image, which may include animage of a lens 1, is input from the CCD camera 30, and at A-2(Inspection Portion Separation Subroutine, shown in FIG. 17) a portioncorresponding to the image of the lens 1 to be inspected (i.e.,inspection portion) is separated from the input image according to thedistribution of luminance.

If the lens 1, which should be inspected during the separation of theinspection portion, is not positioned at the specified inspectionposition, a defect flag is set during the separation process, and in theinspection routine, the decision as to whether the inspection should becontinued or not is made according to whether the defect flag is set ornot (at A-3).

At A-4 (Binary Coding Subroutine, shown in FIG. 20), the separated imageof the inspection portion is separated by dynamic binarization into thescatterable defect, having a luminance higher than the averageluminance, and the absorptive defect, having a luminance lower than theaverage luminance, and at A-5 it is checked whether there is a mark, andat A-6 (Mark Separation Subroutine, shown in FIG. 21), the mark of thevisual field frame or the AF frame is separated from the binarizedimage, if required, and the respective judgements are executed by eachof the left and right inspection optical systems.

The processes of inspection according to an image of the left inspectionoptical system are shown at A-8 through A-17, and the processes ofinspection according to an image of the right inspection optical systemare shown at A-18 and A-19. In each inspection, the features of thedefect (e.g., the coordinates and area) are extracted (drawn) from abinary image of the separated inspection portion and accordingly it isjudged whether the lens 1 is defective or not. If a defect is detectedby any of the inspection systems, even if the other inspection systemhas not completed its inspection, the result is indicated and theinspection of the lens 1 is discontinued, as shown at A-20 and A-21.

If no defect is detected in either the left or right inspection systemregarding one common lens 1, at A-22 through A-24, a total judgementfrom the results of both inspections is indicated, and at A-25 and A-26,the inspection is continued for the remaining lenses to be inspected,until there is no lens left to be inspected. At A-21 and A-24, duringthe indication of the total judgement, if the lens to be inspected isdefective, a mark indicating the defect is stamped thereon by themarking unit 140.

The processes for the left inspection optical system are, at A-9 (MarkJudgement Subroutine, shown in FIG. 23) a judgement as to whether one ofthe parts of the lens designated as a mark (i.e., the AF frame etc.) isa defect is made by separating the marks from the lens, and at A-11through A-16 (Mold Mark Detection Subroutine, Mold Mark ControlSubroutine, respectively shown in FIGS. 24 and 25) whether a mold mark,i.e., a hollow-shaped or projection-shaped defect formed on the lenscaused by either a chip of plastic or a scratch being on the mold, ispresent, is judged. If a mold mark is appears or disappears, an alarm issounded to notify the inspector.

The following description will be directed towards each of thesubroutines included in the flow chart of FIG. 16.

Inspection Portion Separation Subroutine

In the Inspection Portion Separation Subroutine (inspection portionseparation process), the image of the inspection portion is extracted(drawn) from the input original image of the lens, to separate theinspection portion from the background area. Necessary data includingthe original image, the threshold values of scanning in X-axis andY-axis directions, the threshold value to separate the inspectionportion from the background area, the size of the lens 1 to beinspected, the designated value of the effective aperture of the lens 1,and the designated value of the judging area, is input to the inspectionapparatus.

As illustrated in FIG. 17, at B-1, the original image input from the CCDcamera 30, is firstly binarized using the threshold value between thehigh luminance background area and the middle luminance inspectionportion.

Then at B-2 through B-7, the binarized image is scanned in the X-axisand Y-axis directions (perpendicular to each other), and the luminancedistribution of the image in each direction is calculated, andaccordingly the boundary points (i.e., boundary points for thepreliminary separation process) of each luminance distribution aredetected, subsequently it is judged whether the boundary points of theluminance distribution in the X-axis and Y-axis directions aresuccessfully detected.

The luminance distribution of the image is the sum total of theluminance of pixels sharing the same coordinate positions in the X-axisor Y-axis direction. In the case of the apparatus of the firstembodiment of the present invention, if the lens 1 to be inspected isset in place, since it is possible to obtain an image, such as shown inFIG. 18(A), which includes middle luminance inspection portion S(indicated by hatching in FIG. 18(A)) in the high luminance backgroundarea B, the distribution of the image of the binarized image in eachdirection (X, Y) is as shown in FIGS. 18(B) and (C), and therefore, bydetecting the boundary points of the luminance distribution, a limitedportion including the inspection portion can be extracted in the form ofa rectangle as indicated by the dashed line in FIG. 18(A).

On the other hand, if the lens 1 to be inspected is not set in place(FIG. 19(A)), since the luminance distribution of the image thereof isuniform as shown in FIGS. 19(B) and (C), it is impossible to detect theboundary points of the luminance distribution. Therefore, by judgingwhether the boundary points are calculated or not, it is possible tojudge whether the lens 1 is set in place or not.

The processes at B-1 through B-7 show the preliminary separation processof the inspection portion, and with such a process if the boundarypoints are not detected at one of the inspections in the X and Y axesdirections, a defect flag is set at B-8 and the process returns to theInspection Routine. However, if the boundary points are detected in boththe inspections in the X-axis and Y-axis directions, the main separationprocess commences.

In the main separation process, based on the data of each boundarypoint, obtained by the above-mentioned preliminary separation process,and the data of the shape of the lens to be inspected (input inadvance), the inspection portion, which coincides with the actual lensto be inspected, is separated from the rectangular-shaped limitedportion which was separated in the preliminary separation process. Sincethe portion to be inspected on the original image has already beenlimited, in the preliminary separation process, to the portion whichonly includes the approximate inspection portion, i.e., therectangular-shaped limited portion in FIG. 18(A), it is possible toexecute the main separation at high-speed and with high-accuracy.

At B-9 through B-13, the effective outline of the inspection portion andthe balanced center thereof are calculated, and according to the size ofthe lens to be inspected, the reference effective aperture of the lens,the reference judging area, the magnification of the CCD camera 30,effective aperture and the effective judging area are calculated.

As described above, in the Inspection Portion Separation Subroutine ofthe present embodiment, since it is possible to judge whether a lens tobe inspected is set in position in the preliminary separation process,where the amount of processing is lower than that of the main separationprocess, it is possible to judge the defect promptly, as compared tojudging the same only after the inspection portion separation processhas been entirely executed, it is possible to judge whether the lens isset in place or not promptly, and thus expedite the inspection processin the case where there are a large number of lenses to be inspected.

Binary Coding Subroutine

In the Binary Coding Subroutine (binary coding process) the features ofthe defect are drawn from the image of the inspection portion that isobtained by the above inspection portion separation process. Datanecessary for the Binary Coding Subroutine, such as, the original image,the effective aperture of the inspection portion, a luminance shiftvalue on the side of low luminance and a luminance shift value on theside of high luminance, etc., are input.

As shown in FIG. 20, at C-1 a histogram of pixels forming the image ofthe inspection portion, obtained in the inspection portion separationprocess, is produced, and at C-2 the threshold value thereof accordingto the peak method is calculated, as the average luminance of theinspection portion.

At C-3 through C-8, according to the type of lens being inspected or thecontent of inspection, that part of the inspection portion having asignificantly different luminance from the rest of the inspectionportion, may be replaced by the average luminance. Replacement by theaverage luminance is made by leveling the significantly differentluminance prior to the formation of the threshold value image, to beused in the dynamic binarization.

In the present embodiment, the image which is produced by leveling theoriginal image is shifted according to the luminance shift value, whichis predetermined according to the type of lens being inspected, to beused as the threshold value image in the dynamic binarization. However,if the leveled image obtained by merely leveling the original image isused as the threshold value image, if a defect exists which causes aluminance value having a large peak in the original image, there is apossibility that a defect having a small peak in the vicinity of thelarge peak, may not be detected. For example, if there is a defect inthe original image having a high luminance value (peak) significantlydifferent from the average luminance, even though the peak luminance ofthe defect may be leveled, i.e., become lower, the luminance of the areaaround the defect may be slightly raised. Subsequently, if the thresholdvalue image is formed by shifting the leveled image by the luminanceshift value, the threshold value of area around the defect may becomehigher, and there is a possibility that the high luminance defect havinga small peak, positioned near to the large peak, may not be detected.Such a problem may also occur with low luminance peaks.

The processes at C-3 through C-8 are those for the purpose of preventingthe above problems. However, according to the type of optical memberbeing inspected there may be cases when the replacement of luminance isnot necessary at all, or is only necessary on the side of low luminance,or is only necessary on the side of high luminance, or is necessary bothon the sides of high and low luminance. If the replacement of luminanceis executed prior to leveling, the duration of the inspection willincrease according to the time required for such processing, andtherefore replacement is only executed when required.

If a defect resulting in a high luminance, namely a scatterable defect,is not to be inspected, the replacement is only undertaken at C-5 forlow luminance values having a value below the average luminance by adesignated value α. If a defect resulting in a low luminance, namely anabsorptive defect, is not to be inspected, the replacement is onlyundertaken at C-8 for high luminance values having a value above theaverage luminance by a designated value α. If both scatterable andabsorptive defects are to be inspected, the replacement is undertaken atC-6 for both high and low luminance values outside the range of ±α.

If the criteria for judgement is not strict and if it is sufficient onlyto be able to detect a defect having a luminance significantly differentfrom the average luminance, since it is possible to detect the defect byspecifying the luminance shift value to be large, the luminance is notreplaced.

After the above-mentioned prior processing, the leveled image is formedby the replacement of average values, and by shifting the specifiedluminance shift value to the sides of low luminance and high luminancerespectively, corresponding to the lens to be inspected, the thresholdvalue images on the sides of low luminance and high luminance areformed. Then, by comparing these threshold value images with theoriginal image, by the method of floating the threshold value, at C-9,C-10 and C-11, dynamic binary processing is executed, and low and highluminance defects are respectively encoded as binarized images.

Using the above two types of binary processes, the two binarized imagesare obtained, as shown in FIGS. 7(B) and (C). From the respectivebinarized images, portions corresponding to the respective types ofdefect are detected as images, and according to the respective criteriait is judged whether each detected defect is allowable or not. Injudging the defect of the optical member, since the criteria variesdepending on the types of defect, it is possible to accurately judge bythe separate judgement for each type of defect as described above.

If the threshold value used in the above dynamic binary process, is notappropriately specified, the following problems will arise, namely ifinspection sensitivity is too high, unnecessary information may bedetected in the judgement process, e.g., a minute flaw, therefore thejudgement process subsequently executed may become over complicated, onthe other hand, if inspection sensitivity is too low, flaws which shouldbe considered as defects may not be detected, and therefore thejudgement process may become inaccurate.

Therefore in the present embodiment, in order that the result of codingobtained by dynamic binarization may become the appropriate level forsubsequent processing, the luminance shift values on the low and highluminance sides are registered beforehand according to the type ofoptical member being inspected, and during inspection the luminanceshift values are read out according to the type of optical member.

Mark Separation Subroutine

The Mark Separation Subroutine (mark separation process) is undertakenduring the inspection of an optical member having a mark formed thereon.In the Mark Separation Subroutine, information regarding a position andan area of a mark and the like are stored beforehand, in order toseparate the portion having the mark from the original binarized imageof the inspection portion.

Regarding a lens for a finder of a camera, there are often marks in theform of visual field marks (i.e., a visual field frame) which define thefield of view, or autofocus marks (i.e., an AF frame) which define arange of autofocusing in the field of view, formed on the lens. Thesemarks project slightly from the surrounding surface of the lens, due toa corresponding hollow formed on the mold used for forming the lens.Since light incident on the mark portion scatters, the mark portion isseen as a darker image than the rest of the surface of the lens and thusmay be seen as a frame in the visual field of the finder.

During an inspection for a defect, since a mark portion hascharacteristics similar to those of a scatterable defect there is apossibility, when the lens having a mark on it is inspected, that themark portion is erroneously recognized as a defect, in the case whereeven a minute portion of the image of the mark remains in the inspectionportion, and thus the lens will be judged defective accordingly. In thecase of a lens for a finder on which a mark is formed, after assembly ofthe finder, since the surface on which the mark is formed is positionedon the focusing plane, even a slight defect will be visible togetherwith the mark. Due to this, the criteria for judging whether a defectexists is strict. Therefore, during an inspection of an optical memberhaving a mark portion, it is necessary to thoroughly separate the imageof the mark portion from the inspection portion beforehand.

Input data necessary to undertake the Mark Separation Subroutineincludes binarized original image data, balanced center of the originalimage data, outline data, reference (ideal) mark image data and balancedcenter data thereof, data regarding the number of times a mask isexpanded, and data regarding the number of marks.

The Mark Separation Subroutine will now be described with reference toFIGS. 21 and 22.

In FIG. 21, firstly, a reference image of the mark is read as a maskimage, and an expanded mask image is formed by expanding the referencemark image at D-1 and D-2. FIG. 22(A) illustrates the binarized originalimage, and FIG. 22(B) illustrates the expanded mask image. The binarizedoriginal image and the expanded mask image are overlaid so that theirbalanced centers coincide at D-3, as shown in FIG. 22(C). By calculatingthe logical multiplication (i.e., an AND operation) of each pixel, atD-4, a primary image is obtained as shown in FIG. 22(D), by removingthose defects which are not covered by the expanded mask image. In theAND operation two corresponding binarized images are compared pixel bypixel to form a new image, in such a manner that the density of a pixelshall be “1” if the density of at least one of the pixels is “1”, andthe density of a pixel shall be “0” if the density of both pixels is“0”. Due to the mask image being expanded, it is possible to cover thebinarized original image even if the binarized original image isslightly out of position due to an error in the image being picked-up,etc. In the expansion process the density of the pixels close to theboundary of the mark portion is converted so as to have the same densityas the mark portion. In the present embodiment, due to possible imagepick-up errors, three expansions will be executed.

At D-5, a labelling process is undertaken, in which figures (i.e., marksand defects) included in the primary image (FIG. 22(D)) are respectivelydivided into groups and numbers are allocated to the respective groups,i.e., each group is labelled. At D-6, the number of labelled groups iscompared with the number of marks input beforehand (i.e., four marks inthis example), and if the number of labelled groups is less than thenumber of marks, it means that at least two marks have been recognizedas a combination. At D-7 a mark defect flag is set and control returnsto the Inspection Routine.

If the number of labelled groups is more than the number of marks inputbeforehand, it means that a defect exists, separate from the markportion, in the mask portion. In this case, at D-8 through D-11, theareas of the labelled groups are respectively calculated, and thelabelled groups, equal to the number of marks, are ordered in largenessof size. Since the mark portion may be assumed to be larger than theseparate defect remaining in the primary image (FIG. 22(D)), theseparate defect can be removed, as shown in FIG. 22(E).

However, if a defect and a mark portion have been combined and can notbe separated, the combination will be recognized as a mark. In a markjudgement process, described below, since a judgement as to whether adefect exists is made by comparing the areas of the drawn (extracted)mark portion with a reference (ideal) portion thereof, in the case thatthe size of the defect, that has been combined with the mark, is large,the mark itself will be judged defective.

At D-12, the mark image is separated from the original image, as shownin FIG. 22(F). At D-8 and D-12, if the number of marks is equal to thenumber of labelled groups, the primary image is used as the mark image,since it means that a separate defect does not exist in the maskportion.

Mark Judgement Subroutine

In the Mark Judgement Subroutine (mark judgement process) it-is judgedwhether a mark formed on the surface of the optical member to beinspected is defective, based on a comparison between the ratio of thearea of the mark and the area of a reference (ideal) mark. The markjudgement process requires the following data to be input, namely, dataconcerning the processing subject portion corresponding to therespective marks, data concerning the mark image separated in the markseparation process, data concerning the number of marks, reference markarea data, and upper and lower allowable limits of the ratios of thearea of the mark.

In the flow chart in FIG. 23, at E-1 “i” is set to equal 1, and at E-2it is checked whether the number of marks is less than “i”, and if notcontrol proceeds to E-3. At E-3 through E-8, a mark having the ordernumeral “i” is drawn from the processing subject portion, and the areaS1 thereof is calculated. During the calculation of the area, figures,i.e., marks and defects, in the processing subject portion are labelled,at E-4 through E-7, the figure having the largest size is recognized asthe mark. Even if a separate defect is included in the mark image drawn(extracted) in the mark separation process, the defect will be removedby the above process.

On the assumption that the area of the mark having the order numeral iis normally S0, at E-9 through E-11, it is judged whether the ratio ofS1 and S0 is between the upper and lower limits, and if the ratio isoutside the limits the mark defect flag is immediately set and controlreturns to the Inspection Routine.

In increments of counter i, each mark is judged, and if all the marksare judged to be non-defective, control returns to the InspectionRoutine at E-2.

In the case that one mark is defective, the optical member will bejudged to be defective and therefore judgement processing will end,without judging the remaining uninspected marks. Accordingly, theduration of the judgement process may be shortened.

Mold Mark Detection Subroutine

In the apparatus of the first embodiment, by using image processingtechnology, the mold mark is judged from the binarized image by astatistical method. Namely, in the Mold Mark Detection Subroutine (moldmark detection process), shown in FIG. 24, the mold mark is drawn(extracted) from the binarized image by the statistical method, and if afigure continuously exists in substantially the same position for aduration of a counter (initial counter), the figure will be judged to bea mold mark. However, if the figure temporarily disappears, another(second) counter commences counting until reaching a predeterminedlimit. If after the second counter has reached the predetermined limit,the figure has not reappeared, it is assumed that there is an error indetection, and the initial counter is reset to commence counting asnormal, i.e., as if no figure had existed.

In the case that the optical member being inspected is formed by amulti-cavity mold, data regarding the mold mark will be registered foreach cavity. The data is readable on demand, depending on which cavitythe optical member is being formed in.

At F-1, data is input, namely, the coordinates of the balanced center ofthe figure in the binarized image, the number of figures M, thecoordinates of the balanced center of the suspected mold mark, thenumber of suspected mold marks K, the positional error margin R duringjudgement of identification of figures according to the coordinates ofthe balanced center, the continuous existence limit of the suspectedmold mark (i.e., initial limit) S, and the continuous disappearancelimit of the suspected mold mark (i.e., second limit) C.

When inspection commences, the number of suspected mold marks K is set0, and if a defect which is considered to be a possible mold mark isdetected during inspection, that defect will be registered as asuspected mold mark.

In the following processes, at F-2 through F-17, the registeredsuspected mold mark is used as a reference to judge whether there is afigure identical to the suspected mold mark, and the existing suspectedmold marks are registered as mold marks, or are no longer considered tobe mold marks, and after completion thereof, new suspected mold marksare added, avoiding an overlap of the counter thereof with the counterof the existing suspected mold marks, as shown at F-18 through F-26. Ifthe number of suspected mold marks and that of the figures are both “0”,after processes and judgements at F-1, 2, 3, 18 and 19, control returnsto the Inspection Routine without executing any substantial processing.

If a suspected mold mark exists, it is judged whether there is a figureidentical to such a suspected mold mark at F-2 through F-8, according tothe distance between the coordinates of the balanced center of thesuspected mold mark and the coordinates of the balanced center of thefigure. If a figure identical to the mold mark exists, within thecontinuous existence limit, at F-9 and F-10, the continuous appearancecounter is counted in increments and the continuous disappearancecounter is reset to 0.

If the number of the continuous appearance counter has reached thecontinuous existence limit S, at F-l1 through F-14, it is judged that amold mark exists and the mold mark flag is set and the suspected moldmark is registered as a mold mark. The registered data includes thecoordinates of the balanced center of the mold mark, the molded lensidentification number of the detected lens, and data regarding whichinspection optical system, i.e., the right or the left, the image waspicked-up in.

At F-5, F-16, F-17 and F-15, even though all the figures are inspected,if there is no figure coincident to the corresponding suspected moldmark, the continuous disappearance counter is counted in increments, andif the continuous disappearance limit is exceeded before the existenceof a figure corresponding to the suspected mold, the suspected mold markis erased, and if the continuous disappearance limit has not beenreached the inspection is continued.

After all the suspected mold marks have been inspected, at F-18 through25, it is judged whether there is a coincident suspected mold mark, inregard to each of the figures, and at F-26, in regard to the figurehaving no identical suspected mold mark, it is added as a new suspectedmold mark.

In the above process, it is possible to detect the existence of a moldmark by statistical estimation.

Mold Mark Control Subroutine

The Mold Mark Control Subroutine (mold mark control process) is-used todetect the disappearance of an existing mold mark. Plastic adhering tothe mold, which may be the cause of the mold mark, may be exfoliatedfrom the mold by the adhered molding product during molding, and in thecase of an existence of a mold mark in the mold mark detection process,as long as the mold mark disappears immediately after it comes intoexistence, it is not necessary to feed information about it back to theproduction line.

The Mold Mark Control Subroutine, shown in FIG. 25 consists of asimplified mold mark detection process. At G-1, the following data isinput, namely, the number of suspected mold marks K, the number offigures M, the positional error margin during judgement ofidentification of figures, and the continuous disappearance limit of thesuspected mold mark C.

At G-2 through G-8, it is judged whether there is a coincident figure inregard to each of the mold marks, and in the case that there is acoincident figure, at G-9 and G-10, the continuous disappearance counteris reset to 0, and judgement of the following mold mark commences.

If a coincident figure does not exist, at G-11 the continuousdisappearance counter is counted in increments, and if the number of thecontinuous disappearance counter exceeds the continuous disappearancelimit C, at G-13 and G-14, the registration of the mold mark is erasedand the mold mark erase flag is set. After inspection of all the moldmarks is complete, processing is continued after returning to theInspection Routine.

In the above Mold Mark Control Subroutine, it is possible to observe ifa mold mark detected in the Mold Mark Detection Subroutine (mold markdetection process) continuously exists or not, or is finally erased, andin combination with the mold mark detection process, it is possible tocontrol the mold mark statistically.

As above described, according to the optical member inspection apparatusin the above first embodiment according to a first aspect of the presentinvention, since it is possible to detect the defect of the opticalmember being inspected by the method of image processing according tothe picked-up image of the optical member to be inspected, it ispossible to make objective and uniform judgements regarding the opticalmember. In addition, by using the diffusing plates having differentdiffusion transmittances between the central and peripheral portions, itis possible to detect two types of defects in the optical member duringa single image pick-up.

FIG. 26 illustrates an overall construction of an optical system and ablock diagram of a processing system of a second embodiment of anoptical member inspection apparatus according to the first aspect of thepresent invention. In the second embodiment, instead of the diffusingmeans 20 of the first embodiment, a liquid crystal panel 200 is used,and a controlling means 60 is used to control the liquid crystal panel200. The optical system of the second embodiment will now be describedwith reference to FIG. 26.

The optical system of the inspection apparatus is provided with thelight source 10, and the liquid crystal panel 200 which functions as adiffusing means. Reference numeral 1 designates an object, i.e., apositive lens, to be inspected. Light is emitted from the light source10 and is transmitted through the liquid crystal panel 200 and thepositive lens 1, to be incident on the CCD camera 30. The CCD camera 30serves as an image pick-up means for picking-up an image incidentthereon, i.e., that light transmitted through the lens 1 to beinspected.

The liquid crystal panel 200 consists of a large number of elements(pixels) arranged two-dimensionally. The diffusion transmittance of eachof the elements of the liquid crystal panel 200 is controllableseparately by controlling voltage applied thereto through a controllingmeans 60. The liquid crystal panel 200 is comprised of a central portion202 having a low diffusion transmittance, a peripheral portion 201having a high diffusion transmittance, and a masking portion 203 whichintercepts light.

The size of the central portion 202 of the liquid crystal panel 200 isdetermined such that the width of light emitted perpendicularly (i.e.,parallel to the optical axis Ax) therefrom is approximately equal to thewidth of the lens 1 to be inspected, as can be seen in FIG. 26. Withsuch an arrangement, that light perpendicularly emitted from the centralportion 202 of the liquid crystal panel 200 is incident on the lens 1,while that light perpendicularly emitted from the peripheral portion 201is not incident on the lens 1.

FIG. 27 illustrates examples of plan shapes of lenses to be inspectedand the peripheral portion 201 and the central portion 202 of the liquidcrystal panel 200 set in positions so as to correspond to the lenses. Asshown in FIG. 27 (A-1), if the lens to be inspected is a lens 1 a for afinder having a rectangular plan shape, it is preferable that the planshapes of the peripheral and central portions 201, 202 are rectangularas shown in FIG. 27 (A-2). While, if the lens to be inspected is acircular lens 1 b, it is preferable that the plan shapes of theperipheral and central portions 201, 202 are respectively circular asshown in FIG. 27 (B-2). “R” in FIG. 27 indicates a runner of the plasticlens molded by a multi-cavity mold, and “G” indicates a gate.

In the image picked-up by the CCD sensor 32 in the above structure,shown in FIG. 4, there contain high luminance background areas B,chiefly formed by that high luminance light emitted from the peripheralportion 201, and images of the lens 1 (i.e., lens image forming portion)S which is formed by that low luminance light emitted from the centralportion 202.

By forming the plan shape of the central portion 202 and the lens 1 tobe substantially the same, as above described, it is possible todistinguish between the luminance of the lens image forming portion andthe background area of the image, thus resulting in easier separationprocessing of the subject portion.

FIG. 28 illustrates an overall structure of an optical system in regardto the optical member inspection apparatus according to the secondembodiment of the first aspect of the present invention, during aninspection of a negative lens 2.

In the example shown in FIG. 26, since the inspected positive lens 1functions as a condenser lens, that light which is transmitted throughthe liquid crystal panel 200 and the lens 1 to be inspected, isconverged towards the CCD camera 30. On the other hand, if the lens tobe inspected is a negative lens, in the case of the structure shown inFIG. 26, that light which is transmitted through the negative lens to beinspected will be scattered, and thus may not be effectively madeincident on the CCD camera 30, and thus there is a possibility that thequantity of light is insufficient for the image to be picked-up.

It is for this reason that between the liquid crystal panel 200 and thelens 2 to be inspected, a positive adjusting lens 3, serving as acondenser lens, is positioned to converge (in advance) light to beincident on the lens 2, so that the light transmitted through the lens 2may travel towards the CCD camera 30, as shown in FIG. 28.

In the case where the adjusting lens 3 is positioned between the lens 2and the liquid crystal panel 200, it will be necessary to design thesize of the central portion 202 to be larger than the central portionshown in FIG. 26, in order to make a part of that light emittedperpendicularly from the central portion 202 only incident on the lens 2to be inspected, similar to the example shown in FIG. 26.

FIG. 29 is a flow chart showing an Inspection Routine using theinspection apparatus of the second embodiment of the first aspect of thepresent invention. At H-1, the molded lens identification number isinput to the controlling means 60, in order to identify the type ofoptical member being inspected. The controlling means 60 reads dataregarding the size, shape etc. of the lens being inspected from a datatable according to the molded lens identification number, and at H-2,the designated size of the peripheral and central portions 201, 202 ofthe liquid crystal panel 200 are calculated.

By controlling the application of voltage to each element of the liquidcrystal panel 200, according to the calculated size of each portion 201,202, the controlling means 60 specifies the diffusion transmittance atthe central portion 202, the peripheral portion 201 and the maskingportion to 203 be respectively a %, b %, and 0% (zero percent), at H-3.Thus the following relationship is defined:

0<a<b<100(%)

After the above processing is complete, the light source 10 is lit, andthe image processing apparatus 40 inspects the lens according to theimage picked-up by the CCD camera 30.

At H-4 the image is input from the CCD camera 30, and the inspectionportion corresponding to the image of the lens to be inspected isseparated at H-5 according to the luminance distribution.

At H-6, the separated image of the inspection portion is separated bydynamic binarization into scatterable defects, having a luminance higherthan the average luminance, and the absorptive defects, having aluminance lower than the average luminance, and at H-7 through H-9, thefeatures (e.g., coordinates and area) of the defect are drawn(extracted) from a binarized image of the separated inspection portionand accordingly it is judged whether the lens being inspected isdefective or not. The result of this judgement is simultaneouslyindicated on a monitor display 50.

At H-10 through H-12, if the lenses are to be inspected sequentially,the inspected lens. should be exchanged with a lens to be inspected, andif the new lens to be inspected is the same type of lens as thepreviously inspected lens, the processes from H-4 are repeated. If thenew lens to be inspected is a different type from the previouslyinspected lens, the processes from H-1 are repeated. When the lenses tobe inspected are all inspected, the inspection shall be completed.

As above described, according to the optical member inspection apparatusof the second embodiment according to the first aspect of the presentinvention, in addition to the effects achieved in the first embodiment,it is also possible to vary the setting (i.e., level of transmittance)of the diffusing means (liquid crystal panel 200) so as to correspond tothe type of lens being inspected, since it is possible to vary the sizeof each portion (i.e., central and peripheral portions) of the diffusingmeans according to the shape of the lens being inspected, and thereforea prompt inspection can be realized.

FIG. 30 illustrates an overall construction of an optical system and ablock diagram of a processing system of a third embodiment of an opticalmember inspection apparatus according to the first aspect of the presentinvention.

In the case where the transmittance of the optical member to beinspected, or the reflectance of a defect of the optical member, issubject to the wavelength of light transmitted through the opticalmember, the sensitivity in detecting a defect of the optical member cansometimes increase by specifying the wavelength of the light to beincident on the optical member. For instance, a plastic chip, whichremains on a molding surface of a mold is transformed to be translucent,and often yellowed, due to molding heat, and sometimes enters the moldedoptical member. In such a case, by the incidence of the blue lightcomponent (i.e., complementary color), of the light, on the yellowedplastic, the difference of luminance between the average luminance ofthe image of the optical member and the luminance of the image of thedefect is enlarged or enhanced, compared to using white light. Thisthird embodiment is characterized in that the optical member inspectionapparatus is provided with means for selecting a wavelength of thatlight incident on the optical member.

In the third embodiment, instead of the liquid crystal panel 200 used inthe second embodiment, a color liquid crystal panel 200′ is used toserve as a wavelength selecting means. Except for the use of the colorliquid crystal panel 200′ and several differences in regard to themethod of control of the controlling means 60, the structure of thethird embodiment is substantially the same as that of the secondembodiment of the first aspect of the present invention.

The color liquid crystal panel 200′ consists of a large number ofelements (pixels) arranged two-dimensionally. The diffusiontransmittance of each of the elements is controllable separately bycontrolling voltage applied thereto through the controlling means 60.The liquid crystal panel 200′ is comprised of a central portion 202′having a low diffusion transmittance, a peripheral portion 201′ having ahigh diffusion transmittance, and a masking portion 203′ whichintercepts light. In the third embodiment, the controlling means 60additionally adjusts the spectral transmittances at the central portion202′ and the peripheral portion 201′ corresponding to the lens to beinspected or to the type of defect to be detected.

The size of the central portion 202′ of the color liquid crystal panel200′ is determined in a similar way as that of the central portion 202of the liquid crystal panel 200 in the second embodiment of the firstaspect of the present invention, such that the width of light emittedperpendicularly (i.e., parallel to the optical axis Ax) from the centralportion 202′ is approximately equal to the width of the lens to beinspected 1. With such an arrangement, that light perpendicularlyemitted from the central portion 202′ of the color liquid crystal panel200′ is incident on the lens 1, while that light perpendicularly emittedfrom the peripheral portion 201′ of the color liquid crystal panel 200′is not incident on the lens 1.

If the defect of the lens 1 is in the form of black dust, such a defectmay be detected by white light being incident thereupon, and if there isan absorptive defect on the surface or inside the lens 1, for example achip of yellowed plastic, by the incidence of the blue light component(i.e., complementary color), of the light, on the yellowed plastic, itis possible to enlarge the difference of luminance between a inspectionportion S and a defect image DL, and thus the defect image DL can beeasily detected by binarization.

FIG. 31 illustrates an overall structure of an optical system in regardto the optical member inspection apparatus according to the thirdembodiment of the first aspect of the present invention, during aninspection of a negative lens 2. In the example shown in FIG. 30, sincethe inspected positive lens 1 functions as a condenser lens, that lightwhich transmitted through the color liquid crystal panel 200′ andthrough the lens 1 to be inspected, is converged towards the CCD camera30. On the other hand, if the lens to be inspected is a negative lens 2,in the case of the structure shown in FIG. 30, that light which istransmitted through the lens to be inspected will be scattered, and thusthat light transmitted through the lens to be inspected may not beeffectively made incident on the CCD camera 30, and thus there is apossibility that the quantity of light is insufficient for the image tobe picked-up.

It is for this reason that between the color liquid crystal panel 200′and the lens 2 to be inspected, a positive adjusting lens 3, serving asa condenser lens, is positioned to converge (in advance) light to beincident on the lens 2, so that the light transmitted through the lens 2may be travel towards the CCD camera 30, as shown in FIG. 31.

FIG. 32 is a flow chart showing an Inspection Routine using theinspection apparatus of the third embodiment. At J-1, the image is inputfrom the CCD camera 30, and at the following processes J-2 and J-3, theinput image is binarized and the inspection portion, corresponding tothe image of lens to be inspected, is separated.

At J-4 and J-5, the separated image of the inspection portion isbinarized by dynamic binarization processing, and the result isindicated on a monitor display 50. By observing the displayed image atJ-6, an inspector may judge whether the defect is accurately detected ornot, and if the detection is inaccurate, at J-7 the spectral diffusiontransmittance of the color liquid crystal panel 200′ is adjusted, andthe processes J-1 through J-6 are repeated.

The adjustment at J-7 includes, in addition to the variation of theshapes and sizes of the peripheral portion 201′ and the central portion202′, a variation in the spectral transmittances of the peripheralportion 201′ and the central portion 202′, namely a wavelength selectionof the light incident on the lens to be inspected.

At J-8 through J-10, if the defect is judged to be accurately detectedfrom the binarized image of the inspection portion, scatterable defects,having a luminance higher than the average luminance, and absorptivedefects, having a luminance lower than the average luminance, aredetected due to their respective features, and a judgement as to whetherthere is a defect or not is made, according to the detected result. Theresult of this judgement is indicated on the monitor display 50.

As described above, according to the optical member inspection apparatusof the third embodiment according to the first aspect of the presentinvention, by selecting the wavelength of light incident on the lens tobe inspected, it is possible to adjust the ability to detect a defectaccording to the type of lens to be inspected or the color of thedefect.

FIG. 33 illustrates an overall construction of an optical system and ablock diagram of a processing system of a fourth embodiment of anoptical member inspection apparatus, according to the first aspect ofthe present invention. The structure of the optical system of thepresent embodiment is basically the same as that of the first embodimentof the first aspect of the present invention, however, in the presentembodiment a lighting unit 210 movable in a direction denoted by “X” (Xdirection), parallel to the optical axis Ax of the image pick-up means(i.e., a CCD camera 30), and a moving means 65 used to move the lightingunit 210, are provided.

With this structure of the fourth embodiment, it is possible to adjustthe ability to detect between the absorptive defect and the scatterabledefect. The ability to detect increases as the difference in luminanceincreases between the average luminance of the image of the opticalmember and the luminance of the image of the defect.

The ratio of light between the central and peripheral portions incidenton the lens being inspected, varies according to a movement of thelighting unit 210 in the X direction. In the following discussion acomparison will be made between the cases in which the lighting unit 210moves in a direction towards the lens to be inspected, as shown in FIG.34(A), and in which the lighting unit 210 moves in a direction away fromthe lens to be inspected, as shown in FIG. 34(B).

If the diffusing means 20 moves as a whole unit, the shorter thedistance between the diffusing means 20 and the lens 1 becomes, theincident angle of that light emitted from the peripheral portion to beincident on the lens 1 will increase, and the intensity of scatterablelight due to a defect will also increase. For example, in the case ofFIG. 34(A), provided that the incident angle of light emitted from anyone point on the first diffusing plate 21 and incident on the center ofthe lens 1 to be inspected is θ1, and in the case of FIG. 34(B), theincident angle of light emitted from any one point on the firstdiffusing plate 21 and incident on the center of the lens 1 is θ2, thefollowing relationship is defined, namely, θ1>θ2.

Therefore, in the case of a large incident angle as shown in FIG. 34(A),the ability to detect a scatterable defect will increase, while at thesame time the ability to detect an absorptive defect will decrease. Onthe other hand, in the case of a small incident angle as shown in FIG.34(B), the ability to detect a scatterable defect will decrease, whilethe ability to detect an absorptive defect will increase.

Likewise, in the present embodiment in which the lighting unit 210 movesas a whole unit, the luminance of the whole picked-up image and theaverage luminance of the inspection portion, will increase in the caseof FIG. 34(A), in which the distance from the light source 10 to thelens 1 is relatively -short, compared to the case shown in FIG. 34(B).However, due to the variations of the luminance of the whole picked-upimage and the average luminance of the inspection portion, both theluminance of the defect portion and the base luminance are shifted, andthus the scatterability specified by the difference of the luminance ofthe defect portion and the base luminance, and the ability to detect theabsorptive defect will be as above described.

FIGS. 35(A) and 35(B) illustrate examples when only the second diffusingplate 22 is moved in the optical axis direction. In such cases, theincident angle of light emitted from the peripheral portion of thediffusing means 20 does not vary, but the balance of quantities of lightbetween that light emitted from the peripheral portion and that lightemitted from the central portion will vary. If the second diffusingplate 22 moves towards the lens 1 as shown in FIG. 35(A), since theratio of light emitted from the central portion increases, as comparedwith that light emitted from the peripheral portion, the ability todetect an absorptive defect also increases. While if the seconddiffusing plate 22 moves away from the lens 1 as shown in FIG. 35(B),since the ratio of light emitted from the peripheral portion increases,as compared with that light emitted from the central portion, theability to detect a scatterable defect also increases.

If the lighting unit 210 is moved towards the lens 1, since the incidentangle of light incident on the lens 1 from the peripheral portionincreases as described above, both the luminance of the high luminanceportion DH due to the scatterable defect, and the luminance of the lowluminance portion DL due to the absorptive defect, increase, as shown inFIG. 36(A). Therefore in such a case, the ability to detect ascatterable defect will increase, while the ability to detect anabsorptive defect will decrease.

Conversely, if the lighting unit 210 is moved away from the lens 1,since the quantity of all the light incident on the lens 1 decreases,the average luminance accordingly decreases. At the same time, theincident angle of the light incident on the lens from the peripheralportion decreases, thus both the luminance of the high luminance portionDH due to the scatterable defect, and the luminance of the low luminanceportion DL due to the absorptive defect, will decrease, as shown in FIG.37. Therefore, in such a case, the ability to detect an absorptivedefect will increase, while the ability to detect a scatterable defectwill decrease.

FIG. 38 is a sectional view illustrating an example of a structure ofthe lighting unit 210. In the lighting unit 210, an optical fiber 122,which transmits light from the light source 10, is introduced to theinside of a casing 211 via the bottom thereof, and at an upper openingof the casing 211, the diffusing means 20 in the form of a single plateis mounted. The diffusing means 20 in the present example is arrangedsuch that the sheet-shaped second diffusing plate 22 is adhered to thecenter of the plate-shaped first diffusing plate 21. That end of theoptical fiber 122 projecting from the casing 211 is fixed by a set screw123.

The lighting units 210 (note that only one of the lighting units 210 isshown in FIG. 38) are mounted to be slidable in the X direction, onguide rails 110 and 111 which are mounted to the main apparatus viaslidable members 214. Screw rods 215 are mounted on the guide rails 110and 111, and in the slidable members 214, screw holes 214 a are formedto engage with the screw rods 214. By turning operational wheels 216,fixed at the top end of the screw rods 215, by holding knobs 216 a, theposition of the lighting units 210 can be adjusted in the X direction.

In the present example, the moving means 65 consists of the samecomponents as shown in FIG. 10, namely the guide rails 110 and 111, thescrew rod 215, the operational wheel 216 and the slidable member 214.

The inspection process using the above apparatus will now be describedwith reference to the flow chart shown in FIG. 39. FIG. 39(A)illustrates the actual Inspection Routine, and FIG. 39(B) illustratesthe Adjustment Routine which controls the adjustment of the ability todetect. In preparation for the inspection, information regarding thelens to be inspected is loaded in the form of a data table. In addition,according to the information, appropriate diffusing plates are selected,and the magnification of the CCD camera is appropriately set.

During the inspection, the Inspection Routine shown in FIG. 39(A) isexecuted. The processes at K-1 through K-8 in the present routine arethe same as those at H-4 through H-11 (FIG. 29) in the InspectionRoutine of the second embodiment of the first aspect of the presentinvention, therefore no explanation of the processes K-1 through K-8shall be given.

The Adjustment Routine is executed in the case that a defect is notdetected accurately due to a variation of the state of the inspectedlens during inspection, or in the case that the criteria in regard tothe absorptive or scatterable defect becomes stricter. In the AdjustmentRoutine, the inspection criteria can be adjusted by adjusting thebalance of light incident on the lens to be inspected from the centraland peripheral portions of the diffusing means.

In the Adjustment Routine, processes at L-1 through L-6, are the same asthe processes at K-1 through K-6, and so no explanation shall be given.At L-7 an inspector compares the indicated defect with the actual defectof the lens to be inspected, and judges whether the defect has beenaccurately detected. If the detection is inaccurate, at L-8 the lightingunit 210 is moved, and the judgements are executed repeatedly until thedetection is approved (i.e., the inspection is OK).

As above described, according to the optical inspection apparatus of thefourth embodiment of the first aspect of the present invention, byadditionally moving the diffusing means in the optical axis direction,the relative intensity of scatterable light due to the defect may bevaried, and therefore it is possible to adjust the ability to detectbetween the absorptive defect and the scatterable defect.

FIG. 40 illustrates an overall construction of an optical system and ablock diagram of a processing system of a fifth embodiment of an opticalmember inspection apparatus according to the first aspect of the presentinvention. In the fifth embodiment, the moving means 66, for moving thediffusing means 20, is movable in a direction parallel to the opticalaxis Ax of the CCD camera 30, is provided.

The light source 10 projects light having an angle of divergence θ, andis movable by the moving means 66 in the X direction, parallel to theoptical axis Ax of the CCD camera 30. By moving the light source 10 inthe X direction, it is possible to adjust the balance of the ability todetect between the absorptive and scatterable defects.

The ratio of light emitted from the central and peripheral portions ofthe diffusing means 20, incident on the lens to be inspected, variesaccording to the movement of the light source 10 in the X direction. Ifthe distance between the light source 10 and the diffusing means 20becomes shorter, the amount of light, emitted from the light source 10,incident on the diffusing means 20 decreases, as indicated by R1(incident portion) in FIG. 41(A), and the ratio of light incident on thecentral portion of the diffusing means increases, while the ratio oflight incident on the peripheral portion decreases.

If the distance between the light source 10 and the diffusing means 20increases, the amount of light, emitted from the light source 10,incident on the diffusing means 20 increases as indicated by R2 and R3in FIG. 41(B) and FIG. 41(C), and the ratio of light incident on thecentral portion decreases, while the ratio of light incident on theperipheral portion increases.

If the light source 10 is moved towards the diffusing means 20, theratio of light emitted from the central portion and incident on the lens1 to be inspected becomes relatively high, in comparison to the ratio oflight emitted from the peripheral portion, and thus the averageluminance increases. At the same time, since the ratio of light emittedfrom the peripheral portion and incident on the lens 1 becomesrelatively low, the luminance of the high luminance portion due to thescatterable defect decreases.

Light incident on an absorptive defect, may be scattered from an edge ofthe defect, and in the case that a large quantity of the incident lightis emitted from the peripheral portion, the luminance of the lowluminance portion tends to increase due to the absorptive defect. While,in the case that a small quantity of the incident light is emitted fromthe peripheral portion, the scattering of light from the edge of thedefect will be slight, and the luminance of the low luminance portionwill decrease due to the absorptive defect.

Therefore, as shown in FIG. 37, the difference between the low luminanceportion and the average luminance increases due to the absorptivedefect, and the ability to detect the absorptive defect increases.However, since the difference between the luminance of the highluminance portion and the average luminance decreases due to thescatterable defect, the ability to detect the scatterable defect willdecrease.

On the other hand, if the light source 10 is moved away from thediffusing means 20, the ratio of light emitted from the peripheralportion, incident on the lens 1, compared with all the light incident onthe lens 1, increases, and therefore the luminance of the picked-upimage in the high luminance portion increases due to the scatterabledefect. At the same time, since the ratio of light emitted from thecentral portion, incident on the lens 1, compared with all the lightincident on the lens 1, decreases, the average luminance of theinspection portion decreases.

Therefore, as shown in FIG. 36(A), the difference between the highluminance portion and the average luminance increases due to thescatterable defect, and the ability to detect the scatterable defectwill increase. However, due to the increased quantity of incident lightemitted from the peripheral portion, due to the scattering of light atthe edge of the defect, the luminance of the low luminance portionincreases due to the absorptive defect, and therefore the differencebetween the luminance of the low luminance portion and the averageluminance decreases due to the absorptive defect, and thus the abilityto detect the absorptive defect will decrease.

FIG. 42 is a sectional view illustrating an example of a structure ofthe fifth embodiment of the first aspect of the present invention, andis substantially the same as that of the fourth embodiment shown in FIG.38.

As already described, that end of the optical fiber 122 projecting fromthe casing 211 is fixed by a set screw 123, and by loosening the setscrew 123, it is possible to vary the length of insertion of the opticalfiber 122. Since the emission angle of the light from the optical fiber122 is fixed, if the length of insertion of the optical fiber 122 isvaried, an effect similar to that caused by varying the distance betweenthe light source 10 and the diffusing means 20 will result, andtherefore the ratio of the emissive quantity of light from the centralportion and the emissive quantity of light from the peripheral portionof the diffusing means 20 may be adjusted. In the fifth embodiment, themeans for moving the optical fiber 122 consists of the moving means 66.

For example, if the angle of emission of light emitted from the opticalfiber 122 is R2, when the position of the optical fiber 122 is fixed,indicated by the solid lines in FIG. 42, and that the angle of emissionof light emitted from the optical fiber 122 is R1, when the position ofthe emission end of the optical fiber 122 is moved towards the diffusingmeans 20, indicated by the broken lines in FIG. 42, then the followingrelationship is defined, namely, R2>R1. The closer the emission end ofthe optical fiber 122 is to the diffusing means 20, the narrower theangle of emission becomes, and accordingly the ratio of that lightemitted from the peripheral portion of the diffusing means 20 andincident on the lens 1 to be inspected, compared with all the lightincident on the lens 1, decreases, while the ratio of that light emittedfrom the central portion of the diffusing means 20 and incident on thelens 1, compared with all the light incident on the lens 1, increases.

FIG. 43 is a flow chart illustrating the processes of inspection for thefifth embodiment of the present invention. FIG. 43(A) illustrates theactual Inspection Routine and is substantially the same as theInspection Routine of the fourth embodiment shown in FIG. 39(A). FIG.43(B) illustrates the Adjustment Routine during an adjustment of theability to detect, and is substantially the same as the AdjustmentRoutine of the fourth embodiment shown in FIG. 39(B), except that theprocess at L-8 in the fourth embodiment in FIG. 39(B) is replaced by theprocess at L-9 in FIG. 43(B). Therefore, only the process at L-9 will bedescribed here. Namely, if the inspection is inaccurate, the lightsource 10 is moved at L-9, until the inspection is approved (i.e., theinspection is OK).

As above described, according to the optical inspection apparatus of thefifth embodiment of the first aspect of the present invention, byadditionally moving the light source towards the diffusing means in theoptical axis direction, it is possible to adjust the balance of lightemitted from the central and peripheral portions, incident on the lensto be inspected, and therefore it is possible to adjust the balance ofthe ability to detect between the absorptive defect and the scatterabledefect.

FIG. 44 illustrates an overall construction of an optical system and ablock diagram of a processing system of a sixth embodiment of an opticalmember inspection apparatus according to the first aspect of the presentinvention. In the sixth embodiment, similar to the first embodiment ofthe first aspect of the present invention, a supporting structure whichsupports the light source 10 and a diffusing means 20 movable in the Ydirection, perpendicular to the optical axis Ax of the CCD camera 30,are provided.

In the inspection apparatus of the sixth embodiment of the presentinvention, the lighting unit 120 is supported to be movable in the Ydirection, as indicated by “Y” in FIG. 44.

FIG. 44 illustrates an arrangement of an inspection of a lens, when thelens 5 to be inspected is formed in the shape of a wedge prism whichdeflects light in one direction, or has a rotationally asymmetric shapehaving the same function as the wedge prism (hereinafter referred to asprismatic function), and FIG. 45 illustrates an arrangement of aninspection of a lens 1 to be inspected having a rotationally symmetricshape in the rotative direction of the optical axis, or a lens, such asa plane parallel plate, which does not have a prismatic function, i.e.,of being able to deflect light in one direction.

In the optical member inspection apparatus of the sixth embodiment, bymaking the shape of the second diffusing plate 22 to be approximatelythe same as the plan shape of the optical member (i.e., the lenses 1 and5 to be inspected), that light emitted from the lighting unit 120 andtransmitted through the lens to be inspected, to be incident on the CCDcamera 30, is adjusted to approximately be the light emitted from thecentral portion of the diffusing means 20 and transmitted through thesecond diffusing plate 22.

If the distance between the CCD camera 30 and the diffusing means 20 issufficiently long, the light incident on the CCD camera 30 isapproximately limited to be that light which is parallel to the opticalaxis Ax of the CCD camera 30. Therefore, in the case that lighttransmitted through the lens to be inspected and incident on the CCDcamera 30, is limited to only that light transmitted through the seconddiffusing plate 22, it is necessary to set the direction of the light,which is transmitted through the second diffusing plate 22 and the lens1 or 5 to be inspected, to be parallel to the optical axis Ax. In thiscase, the phrase “direction of light” indicates the direction of thelight as a whole, and is considered to be the direction of that lightpassing through the center of the lens, irrespective of the power oflens.

In order to satisfy the above requirements, if the lens does not have aprismatic function, it will be necessary to align the position of theoptical axis of the CCD camera 30, the lens to be inspected and thediffusing means 20, as shown in FIG. 45. While, if the lens has aprismatic function, it will be necessary to adjust the position of thelighting unit 120 such that the light transmitted through the seconddiffusing plate 22 and which is deflected by the lens (having theprismatic function) of lens, is parallel to the optical axis Ax.

By making the above adjustment, that light which is transmitted throughthe non-defective portion (i.e., that portion of the lens having nodefect) of the lens to be inspected and which is incident on the CCDcamera 30, is limited to approximately only that light which istransmitted through the second diffusing plate 22, and the image of theinspection portion in the picked-up image shall be formed by that lighthaving low luminance which is transmitted through the second diffusingplate 22. On the other hand, both the light having low luminance whichis transmitted through the second diffusing plate 22, and the lighthaving high luminance which is only transmitted through the firstdiffusing plate 21, are incident on the CCD sensor 32 so as to form thebackground area around the inspection portion, but since the CCD sensor32 cannot focus on the diffusing means 20, in the background area, theuniform distribution of light, higher than the average distribution oflight thereof at the inspection portion, shall be obtained.

Therefore, it is possible to separate the inspection portion from thebackground area as portions having different luminance, and at the sametime, it is also possible to detect, the scatterable defect as the highluminance portion in the inspection portion, and the absorptive defectas the low luminance portion in the inspection portion, in the lens tobe inspected. If that light which is not transmitted through the seconddiffusing plate 22 but is transmitted through the non-defective portionof the lens to be inspected, is incident on the CCD camera 30 withoutthe above adjustment, at least one part of the inspection portion shallbe in high luminance, and it is impossible to separate the portionsaccording to the luminance, and also in the case of the existence of ascatterable defect in the inspection portion having high luminance, itis difficult to detect the scatterable defect.

FIG. 46 is a schematic view illustrating examples of optical pathsbetween the light source 10 and the CCD sensor 32. FIG. 46(A)illustrates an optical path in the case of a lens to be inspected has aprismatic function and a rotationally asymmetric shape, and FIG. 46(B)illustrates an optical path in the case of a lens to be inspected doesnot have a prismatic function and a rotationally symmetric shape. Inboth cases, that light which is incident within the lens image formingportion (i.e., the inspection portion) O of the sensor 32 (i.e., thatlight transmitted through the lens to be inspected), is limited toapproximately that light having low luminance which is emitted from thecentral portion of the diffusing means 20 and is transmitted through thesecond diffusing plate 22. Therefore, the luminance of the inspectionportion S becomes lower than that of the surrounding portion.

The following description will be made in regard to the amount ofmovement of the lighting unit 120, in the case that the lens to beinspected has a prismatic function. If the arrangement, shown in FIG.45, i.e., in which the optical axis Ax of the CCD camera 30 and the axisof the lighting unit 120 are aligned, is designated as the basicposition, the amount of movement of the lighting unit 120, namely Δy, isobtained by the following formula (1):

Δy=h×tan (φ)  (1)

in which h represents the distance between the lens to be inspected andthe lighting unit 120 in the optical axis direction, and φ representsthe deflection angle of the lens 5 to be inspected due to the functionof the wedge prism.

In theory, if the lighting unit 120 is moved by the amount Δy obtainedfrom formula (1), it will be possible for the CCD camera 30 to pick-upthe inspection portion of the lens to be inspected using that lightwhich is transmitted through the second diffusing plate 22. Since theabove formula (1) solely depends on the prismatic function of theoptical member being inspected, the formula (1) is applicable to bothcases in which the optical member has the power of a lens, and in whichthe optical member does not have the power of a lens.

FIG. 47 illustrates an example, in which the shape of the optical memberis simplified, for the purposes of explanation, to that of a wedge prism6 having a vertex angle θ. The emission surface of the wedge prism 6, onthe side of the CCD camera 30, is set perpendicular to the optical axisAx. The normal of the incident surface of the wedge prism 6, on the sideof the lighting unit 120, and the optical axis Ax, is at an angle θ, andthe incident angle of the ray of light θd, which is incident on theincident surface coincidentally with the optical Ax, according toSnell's law, are denoted as follows:.

n×sin θ=sin θd

θD=sin−1(n×sinθ)

in which, n represents the refractive index of the optical member in theform of the wedge prism 6.

Therefore, in the case of the inspection of the wedge prism 6 in theposition shown in FIG. 47, the amount of movement of the lighting unit120 Δy is given by the following formula (2):

Δy=h×Tan (sin−1 (n×sin θ))  (2)

During the actual inspection, the lighting unit 120 is moved by makingthe value calculated in formula (2) to be an index value. Eventually apicked-up image is indicated on the monitor display 50, and the positionof the lighting unit 120 is adjusted until the defect of the lens beinginspected can be optimally detected.

In the present embodiment, the structure of the lighting unit 120 issuch that it is moved as a whole, namely, the first and second diffusingplates 21 and 22 are moved together in parallel to each other. However,in order to satisfy the purpose of the present invention, it will besufficient if at least the diffusing means 20 moves in the Y direction,and furthermore it will be sufficient if only the second diffusing plate22, which defines the central portion of the diffused light, is moved inthe Y direction.

With the structure of the present embodiment, in the case that thelighting unit 120 is moved as a whole, or in the case that only thediffusing means 20 is moved, it is necessary to determine the area ofthe first diffusing plate 21 according to the area of the range ofpicking-up of the CCD camera 30. If the area of the first diffusingplate 21 is not sufficient, due to the movement of the first diffusingplate 21, there is a possibility that some part of the range ofpicking-up of the CCD camera 30 may be outside the first diffusing plate21, thus resulting in the background area of that portion outside thepicking-up range becoming darker, the distribution of luminance of thebackground, which should essentially be uniform, may become dispersed,thus leading to difficulties in image processing.

If the area of the first diffusing plate 21 is sufficient, with respectto the area of the range of picking-up of the CCD camera 30, thedistribution of luminance of the background portion will not bedispersed during a movement of the lighting unit 120. Additionally,during the separation of the inspection portion from the picked-upportion in image processing, it is possible to easily separate thebackground (high luminance portion) portion.

The following description will be made with reference to FIGS. 48through 51, in regard to an example of a lens inspection apparatushaving two separate inspection systems on the right and left sidesthereof, based on the structure of the sixth embodiment of the firstaspect of the present invention. For the purpose of explanation, in thedrawings an X-axis parallel to the optical axis of the apparatus, and aY-axis and a Z-axis, perpendicular to each other in a planeperpendicular to the X-axis, are designated. Many aspects of the lensinspection apparatus shown in FIG. 48 and FIG. 49, are common to thelens inspection apparatus of the first embodiment of the first aspect ofthe present invention shown in FIGS. 11 and 12. Therefore, in regard tothe lens inspection apparatus shown in FIG. 48 and FIG. 49, thedescription will only be made towards those aspects which differ fromthe lens inspection apparatus of the first embodiment.

Lighting units 120, slidable in the Y-axis direction, are mounted tosupporting substrates 110 a and 111 a fixed on the bottom of the firstand second guide rail members 110 and 111. Slide rails 110 b and 110 c,positioned in the Y-axis direction, are provided on the supportingsubstrate 110 a and the casing 121 of the lighting unit 120, in order tomovably support the lighting unit 120, as shown in FIG. 50. Slidingmembers 125 and 126 are provided to respectively connect to the sliderails 110 b and 110 c. Along the other supporting substrate 111 a on theguide rail member 111, slide rails are arranged in a similar manner.

FIG. 51 is a schematic view illustrating the positioning of the lenses 5to be inspected, when positioned in a lens supporting unit 160 in thestate when connected to the runners R, and the inspection opticalsystems on the right and left. The lenses 5 are held in such a mannerthat the end of the spool Sp is inserted into the insertion bore at thetop end of the lens supporting unit 160, and are supported rotativelyaround the rotational axis Ax3, which is parallel to an optical axis Ax1of the left inspection optical system and an optical axis Ax2 of theright inspection optical system. The distance between the optical axesAx1, Ax2 of the inspection optical systems may be adjusted by operatingthe position adjusting means 113, and each of the axes Ax1 and Ax2 isadjusted so that they may approximately coincide with the optical axesof the lenses 5 to be inspected.

The positions of the lighting units 120 are set in order to satisfy theabove requirements, namely, positions at which light transmitted throughthe respective lenses 5, can be moved in parallel in the Y-axisdirection by a specified amount, so that the respective lighttransmitted through each lens may be parallel to the respective opticalaxis of each CCD camera 30.

As described above, according to the optical member inspection apparatusof the sixth embodiment of the first aspect of the present invention,since the diffusing means is at least movable in the directionperpendicular to the optical axis of the image pick-up means, in thecase that the lens to be inspected has a prismatic function, the lightemitted from the central portion of the diffusing means and transmittedthrough the optical member, is efficiently made incident on the imagepick-up means.

FIG. 52 illustrates an overall construction of an optical system and ablock diagram of a processing system of a first embodiment of an opticalmember inspection apparatus according to a second aspect of the presentinvention.

This first embodiment of the second aspect is characterized in that themagnification of the CCD camera 30 is automatically adjusted so that theimage of the inspection portion, in the picked-up image, may correspondto the reference outline, that has been initially registered accordingto the type of the optical member and also the reference frame, that iscalculated by using the value of a recommended magnification of the CCDcamera 30.

Similar to the embodiments of the first aspect of the present invention,preferably an optical member made of plastic is designated as thesubject to be inspected. The overall structure of the optical memberinspection apparatus in the present embodiment will now be describedwith reference to FIG. 52.

The signal output from the CCD camera 30, which serves as an imagepick-up means to pick-up an image of a lens to be inspected, is input toan image processing apparatus 240 to be processed, and the detectedinformation is indicated on the monitor display 50. In the imageprocessing apparatus 240, an inspection portion separating means 241, amagnification operating means 243, a reference frame computing means242, a binary coding means 244, and a judging means 245 are provided.Additionally, in the image processing apparatus 240, a molded lensidentification number inputting means 260 which inputs the molded lensidentification number (number of the cavity) of the optical member beinginspected, a reference value registering memory 270 in which the design(ideal) value of the outline and the recommended magnification of theCCD camera 30 during picking-up are recorded in relation to the moldedlens identification number corresponding to each type of optical member,a primary value memory 281, a secondary value memory 282, and an imagememory 283, are connected.

The inspection portion separating means 241 binarizes the input imageand separates the inspection portion, in which the object to beinspected exists, from the background portion, and stores theinformation in regard to the outline of the inspection portion in theprimary value memory 281 as the number of pixels, and at the same timestores an image of the inspection portion in the image memory 283. Thereference frame computing means 242 reads, according to the molded lensidentification number input from the molded lens identification numberinputting means 260, the design value of the outline and the recommendedmagnification of the lens being inspected, and computes the referenceframe which is stored in the secondary value memory 282.

The magnification operating means 243 calculates the magnification, bycomparing the size of the inspection portion with the size of thereference frame stored in the value memories 281 and 282, so that thesize of the inspection portion and the reference frame coincide witheach other. The image of the inspection portion picked-up at theappropriate magnification and stored in the image memory 283 isbinarized by the binary coding means 244, and based on the binarizedimage, the judging means 245 judges whether the optical member isdefective or not.

A magnification adjusting means 235 automatically adjusts themagnification, according to the magnification obtained by themagnification operating means 243. The magnification adjusting means 235varies magnification, by varying the distance between the lens beinginspected and the CCD camera 30, or if the CCD camera 30 has a zoomlens, by varying the zooming ratio of the zoom lens.

FIG. 53 illustrates an overall structure of the optical system of thefirst embodiment of the second aspect of the present invention, used toform an image picked-up by the CCD camera 30. Since the optical systemis identical to the optical system of the first embodiment of the firstaspect of the present invention, shown in FIG. 1, no explanation will begiven.

An inspection process using the apparatus of the first embodiment of thesecond aspect of the present invention will now described with referenceto the flow chart shown in FIG. 54. At M-1, the image is input from theCCD camera 30, and at M-2, that inspection portion of the imagecorresponding to the image of the lens 1 to be inspected is separatedaccording to the distribution of luminance, i.e., the inspection portionis separated. At M-3, the size of the outline of the separatedinspection portion is stored in the primary value memory 281, and theseparated image data is stored in the image memory 283.

At M-4, whether it is necessary to adjust the magnification of the CCDcamera 30 is judged. At the start of the inspection, or when the type oflens to be inspected is changed, the magnification of the CCD camera 30is varied according to the size of the lens to be inspected. If themagnification of the CCD camera 30 needs to be adjusted, at M-5 throughM-7, the image processing apparatus 240 reads the outline and therecommended magnification from the reference value registering memory270 corresponding to the molded lens identification number of the lensbeing inspected, input from the molded lens identification numberinputting means 260, and calculates the size of the reference frame.

At M-8, the calculated size of the reference frame is stored in thesecondary value memory 282 as value data corresponding to the number ofpixels. At M-9 and M-10, the magnification operating means 243 comparesthe images stored in the two value memories 281, 282, and based on thecurrent magnification, the magnification is calculated so that the imageof the lens may coincide with the reference frame, and the magnificationadjusting means 235 is controlled so that it may coincide with thecalculated magnification. Then, control returns to M-1 before theinspection begins, so that the image is again read with themagnification being appropriately set.

In the case that it is not necessary to adjust the magnification, namelyin the case that the lens to be inspected is continuously the same typeof lens, or in the case that the magnification has already beenadjusted, at M-11 the image of the inspection portion stored in theimage memory 283 is binarized by dynamic binary processing, and at M-12,the features of the defect are detected from the binary image.

At M-13 and M-14, the image processing apparatus 240 judges whether thelens 1 to be inspected is defective or not according to the detectedresult, and the result of this judgement is displayed on the monitordisplay 50. At M-15, it is judged whether there are any remaining lensto be inspected, and if there is a lens to be inspected at M-16 thelenses are exchanged, and the processes from M-1 are repeated, while ifthere is no lens, the inspection is ended.

FIG. 55 illustrates an overall construction of an optical system and ablock diagram of a processing system of a second embodiment of anoptical member inspection apparatus according to the second aspect ofthe present invention. The second embodiment of the second aspect of thepresent invention only differs from the first embodiment of the secondaspect in the following areas, namely, an image processing apparatus 240a, shown in FIG. 55, is used instead of the magnification operatingmeans 243, an image synthesizing means 246 is provided, while theprimary value memory 281, which stores the size of,the outline of thelens based on the input image, is not provided. The remaining structureof the second embodiment of the second aspect of the present inventionis the same as that of the inspection apparatus shown in FIG. 52.

The image synthesizing means 246 forms an image of a reference frameaccording to the size of the reference frame stored in the secondaryvalue memory 282, and can display the image of the reference frame, onthe monitor display 50, with the reference frame overlaid on thesynthesized input image stored in the image memory 283. For example, asshown in FIG. 56, the inspection portion S and the reference frame F areshown overlapping on a screen 51 of the monitor display 50. Theinspector may operate a magnification adjusting means 235 by observingsuch a display and making a manual adjustment of the magnification ofthe CCD camera 30, so that the outline of the inspection portion Scoincides with the reference frame F. In this case, since the referenceframe F may be obtained according to the data registered beforehand, aslong as the inspection portion S coincides with such a reference memory,it is possible to maintain unitary criteria during the inspection.

As above described, according to the optical inspection apparatus of thesecond aspect of the present invention, since it is possible to specifythe magnification corresponding to a lens to be inspected, based on theobjective criteria according to the data registered beforehand,inconsistency in magnification due to different inspectors will bereduced, and unitary criteria will be maintained during inspection.

The following description is made in regard to an embodiment of a methodof inspection of an optical member, according to an embodiment of athird aspect of the present invention.

This embodiment of the third aspect is characterized in that firstly, animage of the optical member is input from the image pick-up means.Secondly, the input image is binarized and a preliminary separatingoperation is executed, in which the image of the optical member isroughly separated from the input image according to a luminancedistribution of the binarized input image. Thirdly, it is judged whetheror not the preliminary separating operation has been successfullyexecuted. If it is judged that the preliminary separating operation hasbeen success the a main separating operation is executed, in which animage to be inspected is separated from the roughly separated image ofthe optical member, and fifthly, the separated image to be inspected isbinarized to judge whether or not the optical member is defective.

In the method of the embodiment of the third aspect, similar to theprevious aspects of the present invention, an optical member made ofplastic is preferably designated as the subject to be inspected. FIG. 57illustrates an overall structure of the optical system and a blockdiagram of a processing system of the optical member inspectionapparatus of the embodiment of the third aspect of the presentinvention. The optical system and the processing system of thisembodiment are identical to those of the first embodiment of the firstaspect of the present invention, shown in FIG. 1, and therefore noexplanation will be given.

The following explanation refers to the inspection process of theoptical member inspection apparatus of the embodiment of the thirdaspect of the present invention, with reference to the flow chart shownin FIG. 58. In preparation of the inspection, information regarding thelens to be inspected, is loaded in the form of a data table. Inaddition, appropriate diffusing plates are selected according to theinformation regarding the lens, and the magnification of the CCD camera30 is set.

The overall Inspection Routine is shown in the flow chart of FIG. 58. AtN-1, the image is input from the CCD camera 30, and at N-2, theinspection portion corresponding to the image of the lens 1 to beinspected is separated according to the distribution of luminance.

During the separation process of the inspection portion, if the lens isnot positioned at the specified inspection position the defect flag isset during the separation process of the inspection portion, and in theinspection routine, the decision as to whether the inspection should becontinued or not is made according to whether the defect flag is set ornot at N-3.

If the lens is positioned at the specified inspection position, theinspection process is executed. At N-4, an image of the inspectionportion obtained by the main separation, is binarized by dynamicbinarization, and at N-5, the features of the defect are detected fromthe binarized image. At N-6, the image processing apparatus 40 judgeswhether the lens 1 to be inspected is defective, according to thedetected result, and at N-7, the result of judgement is displayed on themonitor display 50.

If the defect flag is set at N-3, processes N-4 through N-7 are skipped.At N-8, a judgement is made as to whether there are any lenses remainingto be inspected, and if there is a lens to be inspected, at N-9 thelenses are exchanged and the processes from N-1 are repeated, while ifthere is no lens to be inspected the inspection process is ended.

The Inspection Portion Separation Subroutine at N-2, included in theabove mentioned inspection process, is identical to the InspectionPortion Separation Subroutine of the first embodiment of the firstaspect of the present invention, shown in FIG. 17.

For reference, in the claim 50 of the present invention, “the firstprocess” to input the image of an object to be inspected, corresponds tothe process N-1 in FIG. 58, “the second process” to make preliminaryseparation of the inspection portion by binarization of the input image,corresponds to the processes B-1, B-2, B-3, B-5 and B-6 in FIG. 17, “thethird process” to judge whether the preliminary separation succeeded ornot, corresponds to the processes B-4 and B-7 in FIG. 17, “the fourthprocess” to make the main separation of the portion as the subject forinspection from the inspection portion preliminary separated,corresponds to the processes B-12 and B-13 in FIG. 17, and “the fifthprocess” to judge whether the object to be inspected is defective or notby binarization of the separated image of portion as the subject forinspection, corresponds to the processes N-4 through N-6 in FIG. 58.

As described above, according to the method of inspection of an opticalmember according to the third aspect of the present invention, theseparation of the inspection portion is made in two stages, namely, apreliminary separation is made in which process loading is light and theaccuracy is low, and a main separation in which process loading is heavyand the accuracy is high, and by judging the defects of lenses in thepreliminary separation stage, in the case of the lenses having defects,inspection time can be reduced.

The following explanation is made in regard to an embodiment of anoptical member inspection apparatus according to a fourth aspect of thepresent invention.

This embodiment of the fourth aspect of the present invention ischaracterized in that a means for picking-up an image of an opticalmember to be inspected is provided, to output an image of the opticalmember. The output image of the optical member is binarized by providedmeans, to detect a suspected mold defect. A first plurality of counters,each counting a number of appearances of the suspected mold defect at acommon position on a plurality of optical members molded by a commonmold, are also provided. When the number of appearances reaches a firstpredetermined number, means are provided for deciding that the suspectedmold defect appearing at the common position is a real mold defect.

In the inspection apparatus of the fourth aspect of the presentinvention, similar to the embodiments of the previous aspects of thepresent invention, an optical member made of plastic is preferablydesignated as the subject to be inspected.

If plastic is used to produce an optical member, when the member istaken out from the mold, if the molding has not sufficiently hardened, apossibility exists that some plastic may remain adhered to the mold.This remaining plastic, if not removed, will hardened to form a chipwhich may adversely affect future moldings, e.g., lead to ahollow-shaped defect, or may damage the mold itself, e.g., resulting ina projection-shaped defect. It should be noted that in the presentinvention, both hollow-shaped and projection shaped defects arehereinafter generically referred to as “mold marks”.

When a mold mark is detected such as to render a lens defective,immediate feedback thereof to the production line is required, and it isnecessary to remove any plastic adhered to the mold, or to exchange themold itself. However, if visual inspection is used, it is difficult todistinguish the mold mark from other defects, thus delaying feedback tothe production line, and leading to reductions in amounts of production.

The overall structure of the optical member inspection apparatus of thefourth aspect of the present invention will now be described withreference to FIG. 59.

A signal output from the CCD camera 30, which serves as the imagepick-up means to pick-up an image of an object (i.e., lens) to beinspected, is input to an image processing apparatus 40, which serves asa defect coding means. The image processing apparatus 40 detects adefect of the lens to be inspected by binarizing the input image of thelens, and displays the detected information on the monitor display 50,and additionally outputs the detected information to a controllingapparatus 360, which serves as a mold mark inspection apparatus.

The controlling apparatus 360 controls an alarming means 370 which emitsan alarm, in the form of light, if a mold mark exists, and a lenssupplying apparatus 380 which supplies the lenses to be inspected to theinspection points, and at the same time detects the existence of a moldmark using continuous appearance counters and continuous disappearancecounters provided in a memory 390.

The controlling apparatus 360 judges the position and size of thescatterable defect, as to whether the scatterable defect should beconsidered to be a suspected mold mark, using the defect detected by theimage processing apparatus 40, and stores the number of times the defectappears at the same position on the optical member molded by the samemold, for the suspected mold mark in the continuous appearance counterin the memory 390.

When the value in the continuous appearance counter exceeds the limitspecified for the detection of a mold mark, the controlling apparatus360 detects the defect to be a mold mark, and outputs a signal in orderfor the alarming means 370 to emit the alarmed. The value in thecontinuous appearance counter is reset if the detection of the defect iscompletely discontinued, i.e., the defect does not appear again.However, if the defect reappears after a short period of disappearance,it is assumed that the disappearance is due to an error in detection,and the previous value in the appearance counter is restored, withoutresetting the value therein. Therefore, the controlling apparatus 360counts the number of times the suspected mold mark disappears using thecontinuous disappearance counter provided in the memory 390, and if thesuspected mold mark is detected again while the value in the continuousdisappearance counter is less than the specified limit of continuousdisappearance, counting in the continuous disappearance counter isresumed without resetting the value in the continuous appearancecounter.

The continuous appearance counter is reset in the case that the valuetherein reaches the specified limit of mold mark detection, or in thecase that the continuous disappearance counter reaches the specifiedlimit of the continuous disappearance limit. The continuousdisappearance counter is reset if the value therein reaches thespecified limit of the continuous disappearance limit, or if thesuspected mold mark is detected to be a defect before reaching thespecified limit value.

For example, if the limit of mold mark detection is set at 20, and thecontinuous disappearance limit is set at 5, a suspected mold markappearing at the same position is judged to be a mold mark when the moldmark detection limit exceeds 20. This does not mean that the suspectedmold mark continuously appears, namely, the suspected mold mark couldtemporarily disappear, as long as the disappearance is within thecontinuous disappearance limit, i.e. 5.

The controlling apparatus 360 is provided with a detecting means whichdetects that a suspected mold mark is a defect under the above-mentionedconditions, a first resetting means which resets the value in thecontinuous appearance counter, and a second resetting means which resetsthe value in the continuous disappearance counter.

FIG. 60 illustrates an optical system used to form an image picked-up bythe CCD camera 30 of the optical member inspection apparatus of thefourth aspect of the present invention. The optical system of thepresent embodiment is identical to the optical system of the firstembodiment of the first aspect of the present invention, shown in FIG.1, and therefore no explanation shall be given.

The following explanation will be given regarding the inspection processof the optical member inspection apparatus of the embodiment of thefourth aspect of the present invention, with reference to the flow chartshown in FIG. 61. In preparation for the inspection, informationconcerning the lens to be inspected, is loaded in the form of a datatable. Additionally, appropriate diffusing plates are selected accordingto this information, and the magnification of the CCD camera 30 is set.

The overall Inspection Routine is shown in the flow chart of FIG. 61. AtP-1, the image is input from the CCD camera 30, and at P-2, theinspection portion corresponding to the image of the lens 1 to beinspected is separated according to the distribution of luminance(Inspection Portion Separation Subroutine).

During the separation process of the inspection portion, if the lens tobe inspected is not positioned at the specified inspection position, thedefect flag is set during the separation process of the inspectionportion, and in the Inspection Routine, the decision as to whether theinspection should be continued or not is made according to the whetherthe defect flag is set or not at P-3.

At P-4, an image of the separated inspection portion is separated bydynamic binarization processing, into the scatterable defect, having aluminance higher than the average luminance, and the absorptive defect,having a luminance lower than the average luminance, and at P-5, thefeatures of the defect are detected.

At P-6 it is judged whether the mold mark appears, and if the appearanceof the mold mark is detected a detection flag is set. At P-7, it ischecked if the detection flag is set, and if the detection flag ischecked, it is immediately notified to the inspector by the alarm 30 atP-8.

At P-9 it is judged whether the mold mark disappears, and if thedisappearance of the mold mark is detected a disappearance flag is set.At P-10 it is checked if the disappearance flag is set, and if thedisappearance flag is checked, it is immediately notified to theinspector by the alarm 30 at P-11.

At P-12 the image processing apparatus 40 judges whether the lens 1 tobe inspected is defective or not according to the detected result, andat P-13, the result of this judgement is displayed on the monitordisplay 50. At P-14, it is judged if there are any remaining lenses tobe inspected or not, and if there is a remaining lens to be inspected,at P-15 lenses are exchanged and the processes from P-1 are repeated,and if there are no lenses left to be inspected, the inspection ends.

The Mold Mark Detection Subroutine at P-6 included in the aboveInspection Routine, is identical to the Mold Mark Detection Subroutineof the first embodiment of the first aspect of the present invention,shown in FIG. 24. Additionally, the Mold Mark Control Subroutine at P-9included in the above Inspection Routine, is identical to the Mold MarkControl Subroutine of the first embodiment of the first aspect of thepresent invention, shown in FIG. 25.

As above described, according to the optical member inspection apparatusof the embodiment of the fourth aspect of the present invention, it ispossible to statistically detect a mold mark appearing on an object tobe inspected, according to the picked-up image of the object to beinspected, and feedback to the production line may be expedited thusimproving production capacity.

The following is a description of an embodiment of an optical memberinspection apparatus using a method of mark separation according to thefifth aspect of the present invention.

This embodiment of the fifth aspect of the present invention ischaracterized in that firstly, an input image of the optical member isbinarized to draw (extract) a figure corresponding to the mark or adefect of the optical member from the binarized input image. Secondly, abinarized image of a reference mark having no defect is expanded.Thirdly, a primary image is generated, including a figure correspondingto the mark and a figure corresponding to the defect, the defect beinglocated in a vicinity of the figure corresponding to the mark, byexecuting an AND operation of the binarized input image and the expandedbinarized reference mark per pixel. Fourthly, the image of the mark isgenerated by removing all figures of defects not connected to the figurecorresponding to the mark from the primary image, in accordance withinformation regarding the reference mark, and fifthly generating animage excluding the image of the mark, by extracting the image of themark generated from the binarized input image.

In the fifth aspect of the present invention, similar to the embodimentsof the previous aspects of the present invention, preferably an opticalmember made of plastic is designated as the subject to be inspected.

In the prior art, it is widely known to use a plano-convex lens as aplastic lens for a finder of a camera. On the plane surface (on oneside) thereof, a visual field mark defining a visual field of thefinder, or an autofocus mark defining a range of automatic focusing, isformed. These marks are formed as projections, compared with thesurrounding surface, due to a slight hollow being formed on the moldwhich is used for molding the lens. Light, from a subject to bephotographed, incident on the mark is scattered, thus the mark is darkerthan the surrounding area, and it may be seen as a frame within thevisual field of the finder.

In the inspection apparatus using image processing technology, if thecharacteristics of the marks and defects are similar, they may bedetected in the same way, and therefore it is necessary to separate thefigure (i.e., the area defined by the mark) of the mark from theinputted image before defect inspection, thus making the separationprocess complicated.

The overall structure of the optical member inspection apparatus of thepresent embodiment will now be described with reference to FIG. 62.

A signal output from the CCD camera 30, which serves as an image pick-upmeans to pick-up an image of a lens to be inspected, is input to animage processing apparatus 440. The image processing apparatus 440displays the detected information on the monitor display 50, controls alens supplying apparatus 460 which supplies the lenses to the inspectionposition, and additionally generates the separated mark image by using aplurality of frame memories provided in an image memory 470.

In the image processing apparatus 440, a binary coding means 441, whichbinarizes the input image to detect the mark and defect of a lens to beinspected, an expansion means 442, which expands the binarized image ofthe defectless reference mark figure, a primary image generating means443, which generates the primary image by the AND operation of thebinarized image detected by the binary coding means 441 and thereference mark figure expanded by the expansion means 442 per pixel, amark image generating means 444, which labels the figures included inthe primary image equal to the number of marks, in order of largeness ofarea, and which generates the mark image by removing the unmarkedfigures, a reversal means 445 which reverses the mark image, a markseparating means 446 which generates the separated mark image by the ANDoperation of the binarized image and the reversal mark image, and ajudging means 447 which judges whether the lens is defective or not,according to the mark image and the mark separated image, are allprovided.

In the image memory 470, an input image memory 471, a binary imagememory 472, a reference mark figure memory 473, a primary image memory474, a mark image memory 475 and a separated mark image memory 476, arerespectively provided to correspond to each of the means provided in theimage processing apparatus 440.

FIG. 63 illustrates the overall structure of the optical system of theembodiment of the fifth aspect of the present invention used to form animage picked-up by the CCD camera 30. The optical system of the fifthaspect of the present invention is identical to the optical system ofthe first embodiment of the first aspect of the present invention, shownin FIG. 1, and therefore no explanation shall be given.

The process of inspection using the above apparatus of the embodiment ofthe fifth aspect of the present invention will now be described withreference to the flow chart shown in FIG. 64. In preparation for theinspection, information concerning the lens is input in the form of adata table. In addition, appropriate diffusing plates are selectedaccording to the input information, and the magnification of the CCDcamera 30 is appropriately set.

The Inspection Routine (inspection process) is shown in the flow chartin FIG. 64. At Q-1, the image is input from the CCD camera 30, and atQ-2, the inspection portion corresponding to the image of the lens to beinspected is separated according to the distribution of luminance.

During the separation process of the inspection portion, if the lens isnot positioned at the specified inspection position the defect flag isset during the separation process of the inspection portion, and in theinspection routine, the decision as to whether the inspection should becontinued or not is made according to whether the defect flag is set ornot (at Q-3).

At Q-4, an image of the separated inspection portion is separated bydynamic binarization processing, into the scatterable defect having aluminance higher than the average luminance, and the absorptive defecthaving a luminance lower than the average luminance, and at Q-5, it isjudged whether there is a mark on the lens to be inspected, and if amark exists, at Q-6 the mark is separated, and at Q-7 it is judgedwhether the separated mark is defective or not. If the mark defect flagis not set during the mark separation and the mark judgement processes,at Q-8 and Q-9, the features of the defect are detected.

At Q-10, the judging means 447 of the image processing apparatus 440judges whether the lens 1 to be inspected is defective, according to thedetected result, and at Q-12 and Q-13, the result of the judgement isdisplayed on the monitor display 50. At Q-8, it is checked if the markdefect flag has been set, and if the flag has been set, it is displayedthat the mark is defective without detecting the features of the defectat Q-13.

At Q-14, it is judged whether there are any remaining lens left to beinspected, and if there are any remaining lenses, at Q-15 the lenses areexchanged by the lens supplying apparatus 460 and the processes from Q-1are repeated until there are no more remaining lenses to be inspected,then the inspection is ended.

In general, the criteria used to judge a defect is stricter for thecentral portion of the optical member, through which the majority oflight is transmitted, than for the peripheral portion of the opticalmember. However, for a finder lens having a mark formed thereon, thecriteria used to judge a defect is stricter for the mark itself and thesurrounding portion of the mark, than the other portion. Therefore, inthe inspection routine of the present embodiment, it is firstly judgedwhether the mark has a defect, and if a defect exists on the mark itselfor on the surrounding portion of the mark, the mark is judged to bedefective without any inspection of the other portion of the lens, andonly if no defect exists on the mark and the surrounding portion, is itjudged whether that the remaining portion of the lens, other than themark, has a defect.

The mark separation subroutine at Q-6, included in the above inspectionroutine of the present embodiment, is identical to the mark separationsubroutine of the first embodiment of the first aspect of the presentinvention, shown in FIG. 21, and thus no explanation shall be given. Inaddition, the mark judgement subroutine at Q-7, included in the aboveinspection routine of the present embodiment, is identical to the markjudgement subroutine of the first embodiment of the first aspect of thepresent invention, shown in FIG. 23.

As above described, according to the optical member inspection apparatusof the embodiment of the fifth aspect of the present invention, with thepreliminary separation by the AND operation, the defect in the image ofthe lens not overlapping with the expanded reference mark figure isremoved from the primary image, and the mark figure is detected bysimply labelling the mark figure of the primary image. Therefore, byinspecting the defective condition during labelling, it is not necessaryto execute a complicated process, and the mark figure can be separatedaccurately by simple processing.

The following is a description of an optical member inspection apparatusand the method thereof of an embodiment of a sixth aspect of the presentinvention.

This embodiment of the sixth aspect of the present invention ischaracterized in that a plurality of optical members are inspected. Eachoptical member is inspected by a plurality of types of inspection, todetect a defect. In this optical member inspection apparatus, the highera frequency of detection of the defect in one type of inspection,amongst the plurality of types of inspection, is, the earlier thatinspection is executed. The frequency of detection being statisticallyobtained through an inspecting operation.

Similar to the embodiments of the previous aspects of the presentinvention, preferably an optical member made of plastic is designated asthe subject to be inspected. The overall structure of the optical memberinspection apparatus and the method thereof of the embodiment of thesixth aspect of the present invention will now be described withreference to FIG. 65.

In the optical member inspection apparatus of the present embodiment,CCD cameras 30 (30 a, 30 b and 30 c), which serve as image input means,corresponding to first, second and third lenses (each denoted by thereference numeral 1) to be inspected, an input switching means 541,which switches and selects an image from among the images of threelenses 1 to be inspected, picked-up by the CCD cameras, an imageprocessing apparatus 540, which processes the switched image signal, ajudging means 542, which judges, according to the information detectedby the image processing apparatus 540, whether the detected defectcorresponding to each lens to be inspected exceeds the specifiedcriteria or not, and a monitor display 50 which displays the result ofthe judgement, are all provided.

The CCD cameras (30 a, 30 b, 30 c) each inspect for a different type ofdefect, i.e., there are three different types of inspection, namely afirst type of inspection, a second type of inspection and a third typeof inspection. For example, the CCD camera 30 a inspects for defects onthe upper surface of the lens, the CCD camera 30 c inspects for defectsinside the lens, and the CCD camera 30 b inspects for defects on thelower surface of the lens.

At positions opposite to each of the CCD cameras (30 a, 30 b, 30 c)light source apparatuses (10 a, 10 b and 10 c) respectively consistingof light sources 10 and diffusing means 20 (20 a, 20 b and 20 c) areprovided. The lenses 1 to be inspected are respectively positionedbetween each respective CCD camera and each respective diffusing means,i.e., each lens is positioned at a respective image input position ofeach CCD camera. By choosing a specific light source apparatus or CCDcamera, the type of inspection to be undertaken can be selected.

Furthermore, in the inspection apparatus a lens supplying apparatus 560sequentially supplies the lenses 1 to be inspected to the respectiveimage input position of each CCD camera. A supply order controllingmeans 543, provided in the inspection apparatus, controls the order inwhich the lenses are supplied (supply order) by the lens supplying means560, based on the frequency of existence of defects per type ofinspection. The frequency of existence of defects per type of inspectionis statistically obtained from the judgement results of the judgingmeans 552.

The lens supplying means 560 supplies each lens to the correspondingimage input position in order. If a lens is detected to have a defectexceeding the inspection criteria of one type of inspection (i.e., theinspection for defects inside the lens), then that lens is no longersupplied to subsequent image inputting positions and is removed, i.e.,the remaining inspections (i.e., the inspection for defects on the uppersurface of the lens and the inspection for defects on the lower surfaceof the lens) are not carried out. Those lenses for which no defect isdetected, are supplied to all the image input positions in order.

In the supply order controlling means 543, a command to supply thelenses, to the CCD cameras 30 a, 30 b and 30 c, is initially fixed in adetermined order, i.e, lenses are firstly supplied to CCD camera 30 a,secondly-supplied to CCD camera 30 b and thirdly supplied to CCD camera30 c, and during a sequential inspection of the lenses, the frequency ofexistence of a defect per type of inspection is judged by the judgingmeans 542. According to the result of judgement of the judging means542, the order in which the lenses are supplied to the CCD cameras ismodified, so that that type of inspection having the highest frequencyof defects, has priority of inspection. Namely, if the highest frequencyof defects is detected inside the lens (i.e., detected by the CCD camera30 c, for example), then subsequent lens are firstly supplied to the CCDcamera 30 c, while if the lowest frequency of defects is detected on theupper surface of the lens (i.e., detected by the CCD camera 30 a, forexample), then subsequent lens are supplied to the CCD camera 30 a,after being supplied to the CCD camera 30 a and the CCD camera 30 b(i.e., having a frequency of defects detected between CCD camera 30 aand CCD camera 30 c).

Note that the inspection having the highest frequency of defects will bereferred to as the first ranked inspection, the inspection having thelowest frequency of defects will be referred to as the third rankedinspection, and that the inspection having a frequency of defectsbetween the highest frequency and the lowest frequency will be referredto as the second ranked inspection.

In the supply order controlling means 543, a counter is provided tocount the total number of lenses that have been inspected, the number ofnon-defective lenses, and the number of defective lenses, for each ofthe three types of inspection. By statistically judging the frequency ofexistence of a type of defect (i.e., a defect inside a lens), accordingto the value of the counter, the supply order of the lenses to the CCDcameras is decided. For example, when a predetermined number of lenseshave been inspected, provided that the proportion of defective lensesdetected by the first type of inspection, judged by the image picked-upby the CCD camera 30 a, is 0%, and that the proportion of defectivelenses detected by the second type of inspection, judged by the imagepicked-up by the CCD camera 30 b, is 5%, and that the proportion ofdefective lenses detected by the third type of inspection, judged by theimage picked-up by the CCD camera 30 c, is 30%, the supply order oflenses to the CCD camera is set in such a manner that the inspection ismade in the order of CCD camera 30 c, 30 b and then 30 a.

If the lens to be inspected is a plastic lens, there is a possibilitythat a defect in the mold may be transferred to the lens, and in thiscase the possibility of a sequential existence of the same defect willbe high. In addition, in regard to other lenses, for example lensesmanufactured in the same lot from the same material, or by the sameapparatus, they may also have a high probability of the existence of thesame type of defect. Therefore, by making that type of inspection havingthe highest frequency of defects, a priority inspection, the number ofinspections in regard to the defective lenses is reduced, and thereforethe efficiency of the total inspection will improve.

FIG. 66 illustrates the structure of an optical system of the presentembodiment used to form an image picked-up by one of the CCD cameras 30a, 30 b and 30 a. It should be noted that in fact three optical systemsare respectively provided to correspond to each of the CCD cameras. Eachoptical system is identical to the optical system of the firstembodiment of the first aspect of the present invention, shown in FIG.1, and therefore no explanation shall be given.

As described above, the balance of the ability to detect between theabsorptive defect and the scatterable defect may be adjusted by varyingthe position of the light source in the optical axis direction. Theability to detect a defect will increase if the difference between theluminance of the defect portion and the average luminance increases, andwill decrease if the difference between the luminance of the defectportion and the average luminance decreases.

In the structure of the optical system of the embodiment of the sixthaspect of the present invention, if the incident angle of that light,emitted from the peripheral portion of the diffusing means, on the lensto be inspected, increases, the strength of the scattering light due tothe defect will increase accordingly, and therefore if the incidentangle is set larger, the ability to detect the scatterable defect willincrease, while if the incident angle is set smaller, the ability todetect the scatterable defect will decrease. In addition, among thetotal quantity of light incident on the lens to be inspected, if theratio of that light, emitted from the peripheral portion of thediffusing means having high luminance, incident on the lens to beinspected, increases, the strength of scattering light due to the defectwill increase accordingly, and therefore the higher such a ratio is set,the ability to detect the scatterable defect will increase, while thelower the ratio is set, the ability to detect the scatterable defectwill decrease.

The light sources 10 a and 10 b, respectively provided for the CCDcameras 30 a and 30 b, are fixed at positions relatively close to therespective lenses 1 to be inspected, as compared with the position ofthe CCD camera 30 c relative to the corresponding lens 1 to beinspected. Regarding each CCD camera 30 a or 30 b, since the quantity ofall the light incident on the lens 1 is relatively large, the averageluminance, will also be large. At the same time, since the angle oflight, emitted from the peripheral portion of the diffusing means,incident on the lens 1 is large, both the luminance in the highluminance portion DH due to the scatterable defect and the luminance inthe low luminance portion DL due to the absorptive defect will becomelarge. In this case, the ability to detect the scatterable defectincreases, while the ability to detect the absorptive defect decreases.

The diaphragms of the CCD cameras 30 a and 30 b are set in such a mannerthat the respective depth of field is reduced by making the opening ofthe diaphragm large. The CCD camera 30 a is set to focus on the uppersurface of the lens 1 to be inspected, and the CCD camera 30 b is set tofocus on the lower surface of the lens 1. The image of the CCD camera 30a is used to detect the scatterable defect, such as a flaw, on the uppersurface of the lens 1 (i.e., the first type of defect), while the imageof the CCD camera 30 b is used to detect the scatterable defect, such asa flaw, on the lower surface of the lens 1 (i.e., the second-type ofdefect).

The light source corresponding to the CCD camera 30 c is set in a remoteposition away from the corresponding lens 1 to be inspected. Since thetotal quantity of light incident on the lens 1 is relatively small, ascompared with that in the case of the CCD camera 30 a or 30 b, theaverage luminance is accordingly small. While at the same time, theincident angle of light, emitted from the peripheral portion of thediffusing means and incident on the lens to be inspected, is relativelysmall, and therefore, the luminance of the high luminance portion DH dueto the scatterable defect, and the luminance of the low luminanceportion DL due to the absorptive defect, both decrease. In this case,the ability to detect an absorptive defect is increased, and the abilityto defect a scatterable defect is decreased.

The diaphragm of the CCD camera 30 c is set so that the depth of fieldis greater than the depths of field of the CCD cameras 30 a and 30 b, sothat the CCD camera 30 c may be able to detect an absorptive defect,such as dust, located inside the lens to be inspected (i.e., the thirdtype of defect).

The process of inspection of the embodiment of the seventh aspect of thepresent invention will now be described with reference to the flowcharts shown in FIG. 67 and FIG. 68.

At R-1, a specified number n is set in a counter C to determine theinterval for resetting the order for inspection. In such a manner, inthe Order Setting Subroutine at R-28, the order of inspection is resetwhen the number of inspected lenses reaches n.

With regard to the third ranked inspection (i.e., that inspection havingthe lowest frequency of defects) at R-2 an image from the CCD camera ofthe third ranked inspection is input, and if at R-3 it is detected thatthere is no lens in position to be inspected by the third rankedinspection, control proceeds to R-11.

If at R-3 a lens is detected, at R-4 a counter for the number of lensesinspected by third ranked inspection is increased by an increment, andthen at R-5 it is judged whether the lens has a defect or not. If nodefect is detected at R-6, a counter for the number of non-defectivelenses is increased by an increment at R-7, and at R-8 the non-defectivelens is ejected from the inspection process. While if at R-6 a defect isdetected, a counter for the number of defects detected by the thirdranked inspection is increased by an increment at R-9, and at R-10 thedefective lens is ejected from the inspection process.

If at R-3, no lens is detected at the position to be inspected by thethird ranked inspection, then at R-11 an image from the CCD camera ofthe second ranked inspection (i.e., that inspection having a frequencyof defects of more than the third ranked inspection and less than thefirst ranked inspection) is input. If at R-12, no lens is detected atthe position to be inspected by the second ranked inspection, controlproceeds to R-19.

If at R-12 a lens is detected, then at R-13 it is judged whether thelens has a defect. If at R-14 the lens has no defect, then at R-15 thenon-defective is moved to the position to be inspected by the thirdranked defect. While if at R-14 the lens has a defect, a counter for thenumber of lenses inspected by the second ranked inspection is increasedby an increment at R-16. At R-17, a counter for the number of defectivelenses detected by the second ranked inspection is increased by anincrement. Subsequently, at R-18 the defective lens is ejected from theinspection process.

At R-19 an image from the CCD camera of the first ranked inspection isinput. If at R-20, a lens is not at the position to be inspected by thefirst ranked inspection, control proceeds to R-27. While, if at R-20 alens is in position to be inspected, control proceeds to R-21 to judgewhether the lens has a defect or not. If at R-22 no defect is detected,the lens is moved to the position to be inspected by the second rankedinspection. While if the lens is defective at R-22, a counter for thenumber of lenses inspected by the first ranked inspection is increasedby an increment at R-24. Subsequently, at R-25, a counter for the numberof defects detected in the first ranked inspection is increased by anincrement, and at R-26 the defective lens is ejected from the inspectionprocess.

At R-27 it is checked whether the inspection is complete, i.e. if thereare any lenses remaining to be inspected. If there are no more lenses tobe inspected at R-27, the inspection routine is ended, while if at leastone lens remains uninspected at R-27, control proceeds to the OrderResetting Subroutine at R-28 (see FIG. 68). After the Order ResettingSubroutine is complete, the next lens is positioned to be inspected atthe first ranked inspection.

In the flow chart shown in FIG. 67, from the point of view of theinspection apparatus, the three types of inspections are executed, atone time (i.e., one loop of the flow chart), for a maximum of threelenses, at R-2 through R-26, and for the purpose of producing anefficient flow of lenses, the inspection, the transfer and the ejectionfrom the inspection process, are executed in order from the third rankedinspection to the first ranked inspection.

Considering a single lens 1 to be inspected, by repeating the routine ofthe flow chart shown in FIG. 67, three times, a maximum of threeinspections will be executed, according to the order of inspectionspecified on the basis of the frequency of existence of a defect.Namely, the inspected lens having no defect is ejected as non-defective,after being inspected, in the order of, the first ranked inspection, thesecond ranked inspection, and the third ranked inspection. On the otherhand, if any of the inspected lenses having a defect exceeding thecriteria is detected, it is immediately ejected as defective, and thefollowing types of inspection are of not executed.

The Order Setting Subroutine shown in FIG. 68, sets the order ofpriority of the inspection types, according to the values of the variouscounters set in the flow chart of FIG. 67, i.e., a defective counter forthe first ranked inspection CN1, which counts the number of defectivelenses detected by the first ranked inspection, a defective counter forthe second ranked inspection CN2, which counts the number of defectivelenses detected by the second ranked inspection, and a defective counterfor the third ranked inspection CN3, which counts the number ofdefective lenses detected by the third ranked inspection. In the flowchart shown in FIG. 68, the code “++” indicates the increment of thecounter, and “−−” indicates the decrement thereof.

In the flow chart shown in FIG. 67, the defective counters are specifiedin order of priority thereof, but the counters do not correspond to thetype of inspection. The correspondences are decided in the order settingin FIG. 68. For example, at R-9 the defective counter of the thirdranked inspection is increased in increments, it does not indicate thatthe defective counter of the third type of inspection is increased. Onthe other hand, the defective counters in FIG. 68 correspond to the typeof defect.

At S-1 in FIG. 68, the counter C, for setting the interval for resettingthe order of increments, is decreased in increments, and at S-2 controlreturns to the flow chart in FIG. 67 without any processing until thevalue of C is 0. If the value of the counter C is 0, at S-3 the value ofthe counter C is reset to be n, and at S-4 through S-14, the values ofthe defective counters in each type of inspection are compared and thepriority order of the types of inspection is set in order of largenessof value of the counter.

In such a manner, each time when the three types of inspections are setn times, the priority order of the type of inspections is reset in orderof the inspection having the highest frequency of existence of defectsduring the latest n times of inspections. When the order is reset, atS-15 the values of each defective counter are reset to be 0, and theflow returns to the flow chart in FIG. 67.

As above described, according to the optical member inspection apparatusand the method thereof.using the mark separation method of theembodiment of the sixth aspect of the present invention, the type ofinspection having the highest frequency of detection has priority toinspect, at the time of detection of a defect, the following types ofinspections are not required to inspect, and comparing with the case ofinspection in the fixed order without considering the frequency ofdetection, the overall throughput of the inspection process willimprove.

The following is a description of an embodiment of an optical memberinspection apparatus according to a seventh aspect of the presentinvention.

In regard to a lens being used as an optical member, since the portionof the lens used for actually transmitting the light is defined as aneffective aperture, the optical performance inspection may besufficiently made in theory as long as an inner periphery of theeffective aperture is designated as a subject (portion) for inspection.In fact however, the portion for inspection is designated to be widerthan that of the effective aperture. This is made in consideration of amisalignment when the optical member is assembled as a product, and soalmost the whole area inside the outer periphery of the lens is includedin the subject for inspection.

If the inspection portion covers a large area such as mentioned above(i.e., larger than the effective aperture), it may lead to a higherpossibility that noise, generated outside the effective aperture, e.g.,noise generated during the separation of the binarized image from theinitial image, or noise due to dirt on and around the optical member, isincluded in the inspection portion. Such types of noise are not due to adefect of the optical member, and thus if such noise exists in theexpanded effective aperture, it will be necessary to remove the noiseupon inspection. In order to remove such noise, included in the portionaround the boundary line of the effective aperture, complicated imageprocessing is necessary, which may overload the processing apparatus,and increases inspection time.

This embodiment of the seventh aspect of the present invention ischaracterized in that a means for picking-up an image of an opticalmember to be inspected is provided, to output an image of the opticalmember. Means for setting a plurality of areas to be inspected in theimage of the optical member, is also provided. One of the plurality ofareas is an outermost area including a boundary line defining a designedeffective aperture of the optical member. In addition, means areprovided for setting a criterion for judgement for each of the pluralityof areas, the criteria being different from one another. A criterion setfor the outermost area is alleviative, compared with the other criteria.Means are also provided for judging whether or not each of the pluralityof areas is defective, in accordance with a corresponding criterion fromthe criteria set by the criterion setting means.

The overall structure of the optical member inspection apparatus of thepresent embodiment will now be described with reference to FIG. 69.

The output signal from the CCD camera 30, which serves as the imagepick-up means to pick-up an image of a lens to be inspected, is input toan image processing apparatus 640, and the detected information isdisplayed on the monitor display 50. In addition, to the imageprocessing apparatus 640, an inspection area memory 661, in which adesign value of the outline of the inspection area is registered, inrelation to the molded lens identification number of the optical memberbeing inspected, input from a molded lens identification numberinputting means 660, an effective aperture memory 662 in which thedesign value of the effective aperture is registered, and a criteriamemory 663 in which the criteria per inspection area are registered, areconnected.

The input image picked-up by the CCD camera 30 is divided, by aninspection portion separating means 641 provided in the image processingapparatus 640, into the inspection area, in which an object to beinspected exists, and the background area, and by a binary coding means642, the separated inspection area is binarized and the defect or thelike is detected as a figure. Each detected figure includes informationregarding its position, area and luminance.

As described above, in regard to the optical member, the area around theoptical axis, through which the majority of light is transmitted, ismore vital, than the area toward the periphery. For example, if thedefect is judged to be defective around the optical axis, there is acase that such a defect may be allowable in a portion of the lens awayfrom the optical axis. Therefore, in the present apparatus, the opticalmember is divided into a plural number of inspection areas according tothe distance from the optical axis, and according to the inspection areato which the figure detected, as a defect or the like, belongs, thefigure is judged to be defective or not, using different criteria.

An inspection area setting means 643 sets the inspection area read fromthe inspection area memory 661 according to the molded lensidentification number of the optical member being inspected, input fromthe molded lens identification number inputting means 660. For example,in the present case as shown in FIG. 70, a primary inspection area isset as the portion enclosed by a primary inspection area line L1 whichdefines the central part through which the optical axis passes, and asecondary inspection area is set as the portion enclosed by a secondaryinspection area line L2, at an intermediate area outside L1. LO is theoutline of the optical member to be inspected.

An outermost peripheral area computing means 644, reads a designedeffective aperture line LE from the effective aperture memory 662corresponding to the molded lens identification number of the lens, andan outermost peripheral inspection area RO (indicated by hatching inFIG. 70), including the designed effective aperture line LE therein, isobtained by calculation. The outermost peripheral inspection area RO isset as the area positioned between two parallel lines which arerespectively positioned inside and outside of the effective apertureline LE, and the portion-outside the secondary inspection area line L2and inside the outermost peripheral inspection area RO is the tertiaryinspection area.

An area judging means 645 judges in which inspection area, specified bythe inspection area setting means 643 and the outermost peripheralinspection area computing means 644, the coordinates of the figureencoded by the binary coding means 642 belongs. A criteria setting means646 sets the criteria of each inspection area by reading the criteriafrom the criteria memory 663 corresponding to the molded lensidentification number of the lens. A judging means 647 judges, in regardto each encoded figure, whether the figure is a defect, according to thecriteria of the area where the figure is positioned, and the result ofjudgement is indicated on the monitor display 50.

FIG. 71 illustrates the overall structure of the optical system of theembodiment of the seventh aspect of the present invention used to forman image picked-up by the CCD camera 30. Since, the optical system ofthe present embodiment is identical to the optical system of the firstembodiment of the first aspect of the present invention, shown in FIG.1, no explanation shall be given.

The Inspection Routine of the apparatus of the present embodiment of thepresent invention will now be described with reference to the flowcharts shown in FIG. 72 and FIG. 73. At T-1, if the type of lens to beinspected is different from that of the previously inspected lens,corresponding to the molded lens identification number of the lens, atT-2 through T-4 each inspection area, and the effective aperture, areread from the corresponding memories 661 and 662, and at T-5 theoutermost peripheral inspection area RO is calculated according to theeffective aperture, and at T-6 the criteria are read from the criteriamemory 663.

After the setting corresponding to the type of the optical member to beinspected is made, at T-7 the image is input from the CCD camera 30, andat T-8 the inspection portion corresponding to the image-of the lens tobe inspected is separated according to the distribution of luminance. AtT-9, the image of the inspection portion is binarized by dynamicbinarization processing, and the features of the defect are detected.

The image processing apparatus 640 judges whether the lens to beinspected is defective, according to the detected result at T-10,(Judgement Subroutine, shown in FIG. 73), and at T-11 the result of thejudgement is displayed on the monitor display 50. At T-12, it is judgedwhether there are any remaining lenses to be inspected, and if there arelenses remaining to be inspected, at T-13, the processes from T-1 arerepeated, while if there are no remaining lenses the inspection isended.

The Judgement Subroutine (judgement processing), executed at T-10 in theInspection Routine of FIG. 72, is executed according to the flow chartin FIG. 73. At U-1 the counter i is reset to 0, and at U-2 and U-8, thecounter i is increased in increments until the value of the counter ireaches the number of the detected figures (i.e., defects or the like),and, for each of the figures, it is judged whether the binary encodedfigure is defective or not.

At U-3 through U-6, it is judged, based on the criteria corresponding tothe inspection area, where the figure is positioned, and at U-7, if anydefect is detected, control is returned to the Inspection Routine (FIG.72), without inspecting the remaining figures.

At U-3, if the position of the figure is judged to be inside theoutermost peripheral inspection area RO, at U-4, the criteria isselected according to the position, namely in which area (primary,secondary or tertiary) the figure is positioned, and it is judgedwhether the figure is defective based on the selected criteria. If thefigure is not positioned inside the outermost peripheral inspectionarea, as long as the figure is positioned within the outermostperipheral area, at U-5 and U-6, the judgement to be defective or not ismade based on mitigated criteria, with respect to the criteria for theprimary, secondary and tertiary inspection areas. If the figure ispositioned outside (i.e., not in the primary, secondary or tertiaryinspection areas) the outermost peripheral inspection area, since it isnot necessary to judge the defect, the inspection proceeds for asubsequent figure.

The criteria shall be set in such a manner that, for example, in theprimary inspection area, a figure consisting of more than four pixels isjudged to be defective, while in the secondary portion, a figureconsisting of more than six pixels is judged to be defective, while inthe tertiary inspection area, a figure consisting of more than eightpixels is judged to be defective, and in the outermost peripheralinspection area, a figure consisting of more than thirty pixels isjudged to be defective.

If all the detected figures are judged to be non-defective, controlreturns to the Inspection Routine (FIG. 72), and the indication to benon-defective is made. If any figure is judged to be defective, controlreturns to the Inspection Routine from U-7, and the indication to bedefective is made, and corresponding optical members are judged to bedefective.

As described above, according to the optical member inspection apparatusof the embodiment of the seventh aspect of the present invention,considering the positional error, by designating the subject forinspection to be wider than that of the design value of the effectiveaperture required for inspection, and by mitigating the criteria in theoutermost peripheral inspection area, including the effective apertureline, in respect to the criteria for the areas inside the effectiveaperture, in the outermost peripheral inspection area, only a relativelylarge figure is detected as a defect, and therefore it is possible todefine certain defects to be not detected. Therefore, it is notnecessary to remove those defects, such as defects in the form of noise,which are not necessary to be recognized as defects, before inspection,and thus the time necessary for inspection can be reduced.

The following is a description of-an embodiment of an optical memberinspection apparatus having a marking function, according to an eighthaspect of the present invention.

This embodiment of the eighth aspect of the present invention ischaracterized in that placing means are provided for consecutivelyplacing each of a plurality of optical members to be inspected, firstly,at a first position, where each image of each optical member ispicked-up, and subsequently at a second position, where each opticalmember is stamped with a predetermined mark. Means for picking-up animage of each optical member at the first position, to output an image,are also provided. In addition, means are provided for judging whetheror not each optical member is defective, according to the image of theoptical member output from the image pick-up means, and means forstamping the predetermined mark on each optical member at the secondposition, depending on a judgement of the judging means regarding theoptical member, are also provided. The placing means conveys one opticalmember to be inspected, which has not yet been inspected, to the firstposition, while conveying another optical member to be inspected, whichhas been already inspected at the first position, to the secondposition.

The overall structure of the optical member inspection apparatus of thepresent embodiment will now be described with reference to FIG. 74.

In the optical member inspection apparatus according to the presentembodiment, a lens 1 to be inspected is positioned at an image pick-upposition, and two CCD cameras 30 (30A and 30B), serving as the imageinput means, input one image, two marking apparatus 700 and 710 whichmark (stamp) the lens to be inspected 1 positioned at a marking positiondifferent from the image pick-up position, and a lens supplyingapparatus 760 which forwards the lenses sequentially in the direction ofthe marking apparatuses, are provided.

At positions opposite to each of the CCD cameras 30A and 30B, lightsource apparatuses 120 a and 120 b, respectively consisting of lightsources 10 (10A and 10B) and diffusing means 20 (20A and 20B), areprovided. The lenses to be inspected are positioned between the CCDcameras and the light sources. By setting the light source apparatus orthe CCD camera, the lens to be inspected can be specified.

For one judging operation the image picked-up by either the CCD camera30A or 30B is first input to an image processing means 740 through aninput switching means 741. For the subsequent judging operation anotherimage picked-up by the other of the CCD camera 30A or 30B is input tothe image processing means 740 through the input switching means 741.After inputting either one of the images, the image processing means 740detects information regarding defects or the like included in the lens 1and outputs the information to a judging means 742. According to theoutput information, the judging means judges whether or not the defectdetected at each type of inspection exceeds a predetermined criteria andindicates the judging result on the 50.

A controlling means 743 controls the lens supplying apparatus 760 sothat the lens 1 to be inspected can be forwarded in the order of,firstly, the inspection position, and secondly, the marking position,and when the lens 1 to be inspected, having a defect that is detectedduring inspection, is forwarded to the marking position, a mark is madeon the lens, indicating the lens to be defective, by controlling themarking apparatuses 700 and 710.

In the present embodiment, based on the signals of the two imageinputting means, different lenses are inspected, and if the result ofinspection, based on the output of the primary CCD camera 30A, isdefective, the lens is marked by the primary marking apparatus 700, andif the result of inspection, based on the output of the secondary CCDcamera 30B, is to be defective, the lens is marked by the secondarymarking apparatus 710.

In the above structure, by forwarding the lens to be inspected in order,the judgement of--the existence of a defect is made based on the outputsof the primary and the secondary CCD cameras 30A and 30B, and duringmarking by the marking apparatus, based on the result of judgement, asubsequent lens may be inspected.

FIG. 75 is a schematic perspective view illustrating an example ofpositioning each part of the inspection apparatus of the presentembodiment. In the present example, similar to the first embodiment ofthe first aspect of the present invention, the lenses 1 to be inspectedare molded by a four-cavity mold as shown in FIG. 10, and are inspectedwithout being removed from a spool Sp and runners R. The lenses 1 to beinspected are positioned perpendicularly to the spool Sp.

At the image pick-up positions of the CCD cameras 30A and 30B, the twolenses 1 to be inspected are positioned facing each other (i.e., thelenses to be inspected are in the same plane). At the marking positionson the marking apparatuses 700 and 710, the two lenses 1 to be inspectedare positioned facing each other (i.e., the lenses in the markingpositions are in the same plane).

In the present embodiment, by rotating the lenses to be inspected as awhole by an angle of 90°, with the spool Sp being the center ofrotation, the lens supplying apparatus 760 forwards each lens to beinspected to the image pick-up position and the marking position,alternately. When the spool has rotated once (i.e., 360°) and each lenshas passed through the four positions, the inspection of the four lenseswill be complete, and the next set of lenses will be inspected.

FIG. 76 illustrates the overall structure of one of the optical systemsused to form images picked-up by the CCD cameras 30A and 30B. Eachoptical system is identical to the optical system of the firstembodiment of the first aspect of the present invention, shown in FIG.1, and therefore no explanation shall be given.

As already described, for example, if a low luminance image DL due tothe absorptive defect, and a high luminance image DH due to thescatterable defect are formed on a scanning line in the X-axisdirection, the output sequence of pixels along the scanning line is asshown in FIG. 7 (A). The image processing apparatus 740 is capable ofdetecting the two types of different defects separately, as shown inFIG. 7(B) and FIG. 7(C), by binarization using two threshold values SH1and SH2.

In the inspection apparatus of the present embodiment, the judgementwhether the detected figure is a defect or not is made based on thespecified criteria, and in the case that detected figure is judged to bea defect, the marking apparatus marks the defective lens. Afterinspection, only those lenses having no mark will be selected asnon-defective and used.

As described above, according to the optical member inspection apparatushaving a marking function of the embodiment according to the eighthaspect of the present invention, by executing inspection and marking inparallel at different positions, compared to the case that theinspection and the marking are executed at the same position, even ifthe durations of each execution are the same, the executions may beexpedited.

The following is a description of an embodiment of an optical memberinspection apparatus using a method of lighting luminance controlaccording to a ninth aspect of the present invention.

In order to maintain a stable inspection, by preventing unevenness ofcriteria during inspection, it is desirable that the setting of theapparatus should be fixed as much as possible, and that variations inlighting luminance should be within a range designated to be permissive.

This embodiment of the ninth aspect of the present invention ischaracterized in that luminance of light, emitted from a light sourceused in an inspection apparatus for inspecting an optical member, iscontrolled. The light emitted from the light source is transmitted tomeans for picking-up an image of the optical member through the opticalmember, an image output from the image pick-up means beingimage-processed to obtain an image of the optical member. The methodconsists of firstly, forming a histogram showing a luminancedistribution of the image of the optical member by a number of pixels.Secondly, a threshold value is obtained according to a discriminantanalysis method, based on the histogram, and thirdly, the luminance oflight emitted from the light source is controlled, in accordance withthe threshold value.

The overall structure of the optical system and the controlling systemof the optical member inspection apparatus of the present embodimentwill now be described with reference to FIG. 77.

The optical system of the present embodiment is identical to the opticalsystem of the first embodiment of the first aspect of the presentinvention and therefore no explanation shall be given.

In the image output from the CCD camera 30, the features of the imageare detected by an image processing means 840, and based on the detectedinformation, it is judged whether the lens 1 to be inspected isdefective or not, by a judging means 843, and the result of thisjudgement is displayed on the monitor display 50.

The image processing apparatus 840 registers the histogram of the inputimage, output from the CCD camera 30, and outputs it to a thresholdvalue setting means 841. The threshold value setting means 841 decides athreshold value by a discriminant analysis method, according to theinput histogram, and a lighting luminance controlling means 842 controlsthe lighting luminance of the light source 10 so that the thresholdvalue may be within a specified range.

The control of lighting luminance is made by adjusting the quantity oflight emission, through adjustments in the applied voltage and the widthof the pulse to the light source 10, and also by positioning a diaphragmor a filter between the light source 10 and the diffusing means 20, andalso by adjusting the diffusion transmittance of the diffusing means 20.

If the input image output from the CCD camera 30 has a background areahaving high luminance and an inspection portion having middle luminance,a histogram, as shown in FIG. 78, will be produced. The threshold valueused as an index to control the lighting luminance is decided by thediscriminant analysis method. The discriminant analysis method is amethod to decide the threshold value during the binary processing of theimage, and when the pixels in the image are classified according to thethreshold values, as long as the classification is made appropriately,the dispersion of luminance within the class (i.e., the dispersionwithin a class σw) is small, and the dispersion of luminance between theclasses (i.e., the dispersion between the classes σb) is large, anddecides the threshold value in such a manner that the ratio thereof Fo,obtained by the following equation Fo=σb/σw, is the maximum.

If the lighting luminance varies, the histogram of the image will shift,while approximately maintaining the form thereof, to the side of lowluminance, as shown in FIG. 79, or to the side of high luminance, asshown in FIG. 80, and the threshold value, determined by thediscriminant analysis method, will also vary according to the variationof the lighting luminance. Therefore, by observing the threshold value,it is possible to control the lighting luminance.

The threshold value, used for lighting luminance control, is determinedaccording to the histogram of the whole image, including the backgroundarea and the inspection portion, and is different from the thresholdvalues SH1 and SH2 used for detecting the absorptive and the scatterabledefects, according to the distribution of luminance in the inspectionportion.

The following discussion will be made in regard to the problemsencountered in the case of controlling the lighting luminance, accordingto the threshold value obtained by any method other than thediscriminant analysis method, in the structure of the inspectionapparatus of the present embodiment of the present invention.

In general, other than the discriminant analysis method, methods used todecide the threshold value for obtaining the binarized image include theP-tile method, the mode method or the peak method etc., and, comparedwith the threshold value obtained by the discriminant analysis method,the threshold value obtained by these methods tends to be affected byvariations in the state of the lens to be inspected.

In the P-tile method, the luminances of the inspection portion S and thebackground area B are very stable, and if the formation of the histogramchanges according to the non-existence of a defect as shown in FIG. 81,and of the existence of a scatterable defect as shown in FIG. 82, thethreshold value will vary even if there is no variation in the lightingluminance.

In the mode method, if scatterable and absorptive defects exist and aplural number of minute values exist on the histogram, it is difficultto determine the threshold value, especially in the case that the sizeof the scatterable defect is large, and that the distribution of thehistogram of the inspection portion and the background area becomecloser as shown in FIG. 83, it will be impossible to determine thethreshold value.

The peak method is a method that, by recording the histogram of the sumof the differential values of the luminances, the luminance of thelargest number of pixels is determined to be the threshold value. Insuch a method, around the boundary of the inspection portion andbackground area, if there is a variation of luminance due to dirt or thelike on the lens, such a variation may become noise, and thus it will beimpossible to determine the threshold value.

The threshold value obtained by the discriminant analysis method ishardly affected by a small variation in distribution, or in the case ofextreme deviations in distributions of luminance, as shown in FIG. 81and FIG. 82, and in addition, even if the peaks of the luminance of theinspection portion and the background area become closer, as shown inFIG. 83, and even if there is a variation of luminance around theboundary portion, it is still possible to determine the threshold value.

The Inspection Routine of the above apparatus of the present embodimentwill now be described with reference to the flow chart shown in FIG. 84.At V-1, the image is input from the CCD camera 30, and at V-2, thehistogram is formed according to the distribution of luminance in theimage processing apparatus 840.

At V-3, the threshold value setting means 841 calculates the thresholdvalue SH by the discriminant analysis method according to the histogram,and at V-4 through V-7, if the threshold value is less than the lowerlimit, the alarm is given and the threshold value is adjusted upwards,and if the threshold value is more than the upper limit, the alarm isgiven and the threshold value is adjusted downwards. If the luminancecan not be positioned within the specified range after adjustment, atV-8 it is judged whether the inspection should be continued or not, andin the case of continuity, control returns to V-1 and the image isinput. If the luminance can not be positioned within the specifiedrange, for example after several adjustments, the inspection isabandoned at V-8, and the inspection is completed.

If the luminance is within the specified range, at V-9 the inspectionportion, corresponding to an image of the lens to be inspected, isseparated from the input image, and at V-10, the image of the inspectionportion is binarized by dynamic binarization processing, and thefeatures of the defect are detected.

At V-11 and V-12, the image processing apparatus 840 judges whether thelens to be inspected is defective or not according to the detectedresult, and the result of judgement is displayed on the monitor display50. At V-13, it is judged whether there are any remaining lenses to beinspected, and if so, at V-14 the lenses are exchanged and the processesfrom V-1 are repeated. If there are no remaining parts to be inspected,the inspection is completed.

As described above, according to the optical member inspection apparatususing the lighting luminance control method of the embodiment accordingto the ninth aspect of the present invention, by controlling thelighting luminance, by making the threshold value an index, obtained bythe discriminant analysis method, it is possible to control the lightingluminance accurately.

Of course, it is clear that the present invention is not limited to theembodiments described above, nor those illustrated in the drawings, andthe invention can be modified without departing from the spirit andscope of the claimed invention.

What is claimed is:
 1. A method for inspecting an optical member to beinspected, in which light emitted from a light source is diffused by adiffusing means, before being made incident on said optical member,light emitted from said optical member being picked-up by an imagepick-up means, said diffusing means comprising a central portion and aperipheral portion, a diffusion transmittance of said peripheral portionbeing higher than that of said central portion, wherein said methodcomprises: a first process to input an image including an image of saidoptical member from said image pick-up means; a second process tobinarize said input image and execute a preliminary separating operationin which said image of said optical member is roughly separated fromsaid input image according to a luminance distribution of said binarizedinput image; a third process to judge whether or not said preliminaryseparating operation has been successfully executed in said secondprocess; a fourth process to execute a main separating operation inwhich an image to be inspected is separated from said roughly separatedimage of said optical member; and a fifth process to binarize saidseparated image to be inspected that is separated in said mainseparating operation, and judge whether or not said optical member isdefective, wherein said fourth and fifth processes are performed onlywhen it is judged in said third process that said preliminary separatingoperation has been successfully executed in said second process.
 2. Themethod in accordance with claim 1, wherein, in said second process, saidpreliminary separating operation is executed such that a rectangularsection including said image of said optical member is separated fromsaid input image in accordance with a luminance distribution in anX-axis direction and a Y-axis direction, said X-axis direction and saidY-axis direction being perpendicular with each other.
 3. The method inaccordance with claim 2, wherein a size of said rectangular section isset to be minimized relative to said image of said optical member. 4.The method in accordance with claim 1, wherein said fifth processcomprises: a process to binarize said separated image to be inspectedthat is separated in said main separating operation using a primarythreshold value, said primary threshold value being lower than anaverage luminance of said separated image to be inspected; a process tobinarize said separated image to be inspected that is separated in saidmain separating operation by using a secondary threshold value, saidsecondary threshold value being higher than said average luminance ofsaid separated image to be inspected; and a process to judge whether ornot said optical member is defective by taking first and secondbinarized signals obtained respectively through said two binarizingprocesses as defects of different types.
 5. The method in accordancewith claim 1, wherein said diffusing means comprises a plane platemember extending substantially perpendicular to an optical axis of saidimage pick-up means, said plane plate member including said centralportion and said peripheral portion.
 6. The method in accordance withclaim 1, wherein said diffusing means comprises a first diffusing plateand a second diffusing plate which together determine said centralportion and said peripheral portion.
 7. The method in accordance withclaim 1, wherein shapes of said central portion and said peripheralportion are each determined according to a shape of said optical memberto be inspected.